original_string: public function detect()
      {
          foreach ($this->detectors as $detector) {
              $locales = (array) $this->getInstance($detector)->detect();
  
              foreach ($locales as $locale) {
                  if ($this->isSupportedLocale($locale)) {
                      return $locale;
                  }
              }
          }
  
          return false;
      }
code: public function detect()
      {
          foreach ($this->detectors as $detector) {
              $locales = (array) $this->getInstance($detector)->detect();
  
              foreach ($locales as $locale) {
                  if ($this->isSupportedLocale($locale)) {
                      return $locale;
                  }
              }
          }
  
          return false;
      }
code_tokens: public function detect ( ) { foreach ( $ this -> detectors as $ detector ) { $ locales = ( array ) $ this -> getInstance ( $ detector ) -> detect ( ) ; foreach ( $ locales as $ locale ) { if ( $ this -> isSupportedLocale ( $ locale ) ) { return $ locale ; } } } return false ; }
docstring: Detect any supported locale and return the first match.
  
  @return string|false
docstring_tokens: Detect any supported locale and return the first match .