original_string: protected function validateFileName($fileName)
      {
          if (!FileHelper::validatePath($fileName, $this->maxNesting)) {
              throw new ApplicationException(Lang::get('cms::lang.cms_object.invalid_file', [
                  'name' => $fileName
              ]));
          }
  
          if (!strlen(File::extension($fileName))) {
              $fileName .= '.'.$this->defaultExtension;
          }
  
          return $fileName;
      }
code: protected function validateFileName($fileName)
      {
          if (!FileHelper::validatePath($fileName, $this->maxNesting)) {
              throw new ApplicationException(Lang::get('cms::lang.cms_object.invalid_file', [
                  'name' => $fileName
              ]));
          }
  
          if (!strlen(File::extension($fileName))) {
              $fileName .= '.'.$this->defaultExtension;
          }
  
          return $fileName;
      }
code_tokens: protected function validateFileName ( $ fileName ) { if ( ! FileHelper :: validatePath ( $ fileName , $ this -> maxNesting ) ) { throw new ApplicationException ( Lang :: get ( 'cms::lang.cms_object.invalid_file' , [ 'name' => $ fileName ] ) ) ; } if ( ! strlen ( File :: extension ( $ fileName ) ) ) { $ fileName .= '.' . $ this -> defaultExtension ; } return $ fileName ; }
docstring: Checks the supplied file name for validity.
  @param string  $fileName
  @return string
docstring_tokens: Checks the supplied file name for validity .