Advertisement
PEMapModder

Untitled

Dec 8th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. $result = new InspectionResult("Bad practice");
  2.         $pluginYml = file_get_contents($this->dir . "plugin.yml");
  3.         $manifest = yaml_parse($pluginYml);
  4.         $mainFile = realpath($this->dir . "src/" . str_replace("\\", "/", $manifest["main"]) . ".php");
  5.         foreach(new \RegexIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dir)), "#\\.php\$#") as $file){
  6.             $contents = file_get_contents($file);
  7.             $isMain = $file == $mainFile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement