original_string: protected function addFileReport(\SplFileInfo $fileinfo)
      {
          // $extension = strtolower($fileinfo->getExtension());
          $extension = strtolower(pathinfo($fileinfo, PATHINFO_EXTENSION));
          if (('php' !== $extension) && ('phtml' !== $extension)) {
              return false;
          }
  
          $content  = file_get_contents($fileinfo);
          $messages = array();
  
          if (preg_match('/Single.*Survey/', $fileinfo->getFilename())) {
              $messages[] = "This seems to be a file for (obsolete) SingleSurveys. This file can probably be removed.";
          }
  
          $this->_checkCodingChanged($fileinfo, $content, $messages);
  
          if (\MUtil_String::endsWith($fileinfo->getPath(), 'controllers')) {
              $this->_checkControllersChanged($fileinfo, $content, $messages);
          } else {
              $this->_checkSnippetsChanged($fileinfo, $content, $messages);
          }
  
          $this->_checkTablesChanged($fileinfo, $content, $messages);
          $this->_checkVariablesChanged($fileinfo, $content, $messages);
          $this->_checkDepreciations($fileinfo, $content, $messages);
  
          if (! $messages) {
              return false;
          }
  
          $this->html->h3(sprintf('Report on file %s', substr($fileinfo->getPathname(), strlen(GEMS_ROOT_DIR) + 1)));
          foreach ($messages as $message) {
              $this->html->pInfo($message);
          }
  
          return true;
      }
code: protected function addFileReport(\SplFileInfo $fileinfo)
      {
          // $extension = strtolower($fileinfo->getExtension());
          $extension = strtolower(pathinfo($fileinfo, PATHINFO_EXTENSION));
          if (('php' !== $extension) && ('phtml' !== $extension)) {
              return false;
          }
  
          $content  = file_get_contents($fileinfo);
          $messages = array();
  
          if (preg_match('/Single.*Survey/', $fileinfo->getFilename())) {
              $messages[] = "This seems to be a file for (obsolete) SingleSurveys. This file can probably be removed.";
          }
  
          $this->_checkCodingChanged($fileinfo, $content, $messages);
  
          if (\MUtil_String::endsWith($fileinfo->getPath(), 'controllers')) {
              $this->_checkControllersChanged($fileinfo, $content, $messages);
          } else {
              $this->_checkSnippetsChanged($fileinfo, $content, $messages);
          }
  
          $this->_checkTablesChanged($fileinfo, $content, $messages);
          $this->_checkVariablesChanged($fileinfo, $content, $messages);
          $this->_checkDepreciations($fileinfo, $content, $messages);
  
          if (! $messages) {
              return false;
          }
  
          $this->html->h3(sprintf('Report on file %s', substr($fileinfo->getPathname(), strlen(GEMS_ROOT_DIR) + 1)));
          foreach ($messages as $message) {
              $this->html->pInfo($message);
          }
  
          return true;
      }
code_tokens: protected function addFileReport ( \ SplFileInfo $ fileinfo ) { // $extension = strtolower($fileinfo->getExtension()); $ extension = strtolower ( pathinfo ( $ fileinfo , PATHINFO_EXTENSION ) ) ; if ( ( 'php' !== $ extension ) && ( 'phtml' !== $ extension ) ) { return false ; } $ content = file_get_contents ( $ fileinfo ) ; $ messages = array ( ) ; if ( preg_match ( '/Single.*Survey/' , $ fileinfo -> getFilename ( ) ) ) { $ messages [ ] = "This seems to be a file for (obsolete) SingleSurveys. This file can probably be removed." ; } $ this -> _checkCodingChanged ( $ fileinfo , $ content , $ messages ) ; if ( \ MUtil_String :: endsWith ( $ fileinfo -> getPath ( ) , 'controllers' ) ) { $ this -> _checkControllersChanged ( $ fileinfo , $ content , $ messages ) ; } else { $ this -> _checkSnippetsChanged ( $ fileinfo , $ content , $ messages ) ; } $ this -> _checkTablesChanged ( $ fileinfo , $ content , $ messages ) ; $ this -> _checkVariablesChanged ( $ fileinfo , $ content , $ messages ) ; $ this -> _checkDepreciations ( $ fileinfo , $ content , $ messages ) ; if ( ! $ messages ) { return false ; } $ this -> html -> h3 ( sprintf ( 'Report on file %s' , substr ( $ fileinfo -> getPathname ( ) , strlen ( GEMS_ROOT_DIR ) + 1 ) ) ) ; foreach ( $ messages as $ message ) { $ this -> html -> pInfo ( $ message ) ; } return true ; }
docstring: A specific report on a code file
  
  @param \SplFileInfo $filename
  @return boolean
docstring_tokens: A specific report on a code file