original_string: protected function findLocale()
      {
          $locale = null;
  
          if (PHP_SAPI == 'cli') {
              $locale = getenv('LANG');
          } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && extension_loaded('intl')) {
              $locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
          }
  
          return $locale;
      }
code: protected function findLocale()
      {
          $locale = null;
  
          if (PHP_SAPI == 'cli') {
              $locale = getenv('LANG');
          } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && extension_loaded('intl')) {
              $locale = \Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
          }
  
          return $locale;
      }
code_tokens: protected function findLocale ( ) { $ locale = null ; if ( PHP_SAPI == 'cli' ) { $ locale = getenv ( 'LANG' ) ; } else if ( isset ( $ _SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] ) && extension_loaded ( 'intl' ) ) { $ locale = \ Locale :: acceptFromHttp ( $ _SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] ) ; } return $ locale ; }
docstring: Find the current locale
  
  @return string
docstring_tokens: Find the current locale