original_string: protected static function getFilesFoundButNotExpected()
      {
          $files = \Piwik\Manifest::$files;
          $pluginsInManifest = self::getPluginsFoundInManifest();
  
          $filesFoundButNotExpected = array();
  
          foreach (self::getPathsToInvestigate() as $file) {
              if (is_dir($file)) {
                  continue;
              }
              $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
              $file = ltrim($file, "\\/");
  
              if (self::isFileFromPluginNotInManifest($file, $pluginsInManifest)) {
                  continue;
              }
              if (self::isFileNotInManifestButExpectedAnyway($file)) {
                  continue;
              }
              if (self::isFileFromDirectoryThatShouldBeDeleted($file)) {
                  // we already report the directory as "Directory to delete" so no need to repeat the instruction for each file
                  continue;
              }
  
              if (!isset($files[$file])) {
                  $filesFoundButNotExpected[] = $file;
              }
          }
  
          return $filesFoundButNotExpected;
      }
code: protected static function getFilesFoundButNotExpected()
      {
          $files = \Piwik\Manifest::$files;
          $pluginsInManifest = self::getPluginsFoundInManifest();
  
          $filesFoundButNotExpected = array();
  
          foreach (self::getPathsToInvestigate() as $file) {
              if (is_dir($file)) {
                  continue;
              }
              $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
              $file = ltrim($file, "\\/");
  
              if (self::isFileFromPluginNotInManifest($file, $pluginsInManifest)) {
                  continue;
              }
              if (self::isFileNotInManifestButExpectedAnyway($file)) {
                  continue;
              }
              if (self::isFileFromDirectoryThatShouldBeDeleted($file)) {
                  // we already report the directory as "Directory to delete" so no need to repeat the instruction for each file
                  continue;
              }
  
              if (!isset($files[$file])) {
                  $filesFoundButNotExpected[] = $file;
              }
          }
  
          return $filesFoundButNotExpected;
      }
code_tokens: protected static function getFilesFoundButNotExpected ( ) { $ files = \ Piwik \ Manifest :: $ files ; $ pluginsInManifest = self :: getPluginsFoundInManifest ( ) ; $ filesFoundButNotExpected = array ( ) ; foreach ( self :: getPathsToInvestigate ( ) as $ file ) { if ( is_dir ( $ file ) ) { continue ; } $ file = substr ( $ file , strlen ( PIWIK_DOCUMENT_ROOT ) ) ; // remove piwik path to match format in manifest.inc.php $ file = ltrim ( $ file , "\\/" ) ; if ( self :: isFileFromPluginNotInManifest ( $ file , $ pluginsInManifest ) ) { continue ; } if ( self :: isFileNotInManifestButExpectedAnyway ( $ file ) ) { continue ; } if ( self :: isFileFromDirectoryThatShouldBeDeleted ( $ file ) ) { // we already report the directory as "Directory to delete" so no need to repeat the instruction for each file continue ; } if ( ! isset ( $ files [ $ file ] ) ) { $ filesFoundButNotExpected [ ] = $ file ; } } return $ filesFoundButNotExpected ; }
docstring: Look for files which are in the filesystem, but should not be
  
  @return array
docstring_tokens: Look for files which are in the filesystem but should not be