#!/usr/bin/env php files() ->name('*.md') ->name('*.php') ->name('*.inc') ->name('*.php.dist') ->name('*.twig') ->name('*.xml') ->name('*.xml.dist') ->name('*.yml') ->in( array( __DIR__ . '/lib', __DIR__ . '/bin', __DIR__ . '/config', __DIR__ . '/www', __DIR__ . '/templates' ) ) ->notName(basename(__FILE__)) ->exclude('.git') ->exclude('vendor') ->exclude('Doctrine/Proxies') ; $count = 0; foreach ($finder as $file) { /* @var $file Symfony\Component\Finder\SplFileInfo */ $old = file_get_contents($file->getRealpath()); $new = $old; // [Structure] Never use short tags (getRealpath(), $new); } printf('%4d) %s' . PHP_EOL, $count, $file->getRelativePathname()); } } exit($count ? 1 : 0);