original_string: private function chromeWithMajorVersion($userAgent) {
  		$start_idx = strpos($userAgent, 'Chrome');
  		$end_idx = strpos($userAgent, '.', $start_idx);
  		if ($end_idx === false) {
  			return substr($userAgent, $start_idx);
  		} else {
  			return substr($userAgent, $start_idx, ($end_idx - $start_idx));
  		}
  	}
code: private function chromeWithMajorVersion($userAgent) {
  		$start_idx = strpos($userAgent, 'Chrome');
  		$end_idx = strpos($userAgent, '.', $start_idx);
  		if ($end_idx === false) {
  			return substr($userAgent, $start_idx);
  		} else {
  			return substr($userAgent, $start_idx, ($end_idx - $start_idx));
  		}
  	}
code_tokens: private function chromeWithMajorVersion ( $ userAgent ) { $ start_idx = strpos ( $ userAgent , 'Chrome' ) ; $ end_idx = strpos ( $ userAgent , '.' , $ start_idx ) ; if ( $ end_idx === false ) { return substr ( $ userAgent , $ start_idx ) ; } else { return substr ( $ userAgent , $ start_idx , ( $ end_idx - $ start_idx ) ) ; } }
docstring: Returns Google Chrome's Major version number
  @param string $userAgent
  @return string|int Version number
docstring_tokens: Returns Google Chrome s Major version number