original_string: private function looksLikeConcatenatedJsString(string $url): bool
      {
          $patternBody = "^'\s+\+\s+.*\s+\+\s+'$";
          $pattern = '/'.$patternBody.'/i';
  
          return preg_match($pattern, $url) > 0;
      }
code: private function looksLikeConcatenatedJsString(string $url): bool
      {
          $patternBody = "^'\s+\+\s+.*\s+\+\s+'$";
          $pattern = '/'.$patternBody.'/i';
  
          return preg_match($pattern, $url) > 0;
      }
code_tokens: private function looksLikeConcatenatedJsString ( string $ url ) : bool { $ patternBody = "^'\s+\+\s+.*\s+\+\s+'$" ; $ pattern = '/' . $ patternBody . '/i' ; return preg_match ( $ pattern , $ url ) > 0 ; }
docstring: Determine if the URL value from an element attribute looks like a concatenated JS string
  
  Some documents contain script elements which concatenate JS values together to make URLs for elements that
  are inserted into the DOM. This is all fine.
  e.g. VimeoList.push('<img src="' + value['ListImage'] + '" />');
  
  A subset of such documents are badly-formed such that the script contents are not recognised by the DOM parser
  and end up as element nodes in the DOM
  e.g. the above would result in a <img src="' + value['ListImage'] + '" /> element present in the DOM.
  
  This applies to both the \DOMDocument parser and the W3C HTML validation parser. It is assumed both parsers
  are not identically buggy.
  
  We need to check if a URL value looks like a concatenated JS string so that we can exclude them.
  
  Example URL value: ' + value['ListImage'] + '
  Pseudopattern: START'<whitespace?><plus char><whitespace?><anything><whitespace?><plus char><whitespace?>'END
  
  @param string $url
  
  @return bool
docstring_tokens: Determine if the URL value from an element attribute looks like a concatenated JS string