original_string: public function validLang($lang)
      {
          if (in_array($lang, $this->validLanguages)) {
              return $lang;
          }
          if ($this->defaultLanguage) {
              return $this->defaultLanguage;
          }
          return false;
      }
code: public function validLang($lang)
      {
          if (in_array($lang, $this->validLanguages)) {
              return $lang;
          }
          if ($this->defaultLanguage) {
              return $this->defaultLanguage;
          }
          return false;
      }
code_tokens: public function validLang ( $ lang ) { if ( in_array ( $ lang , $ this -> validLanguages ) ) { return $ lang ; } if ( $ this -> defaultLanguage ) { return $ this -> defaultLanguage ; } return false ; }
docstring: Check if the current language is a valid language.
  
  @param string $lang Language
  @return mixed.
docstring_tokens: Check if the current language is a valid language .