Source for file GitModified.php
Documentation is available at GitModified.php
* A filter to only include files that have been modified or added in a Git repository.
* @author Greg Sherwood <gsherwood@squiz.net>
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
namespace PHP_CodeSniffer\Filters;
use PHP_CodeSniffer\Util;
class GitModified extends ExactMatch
* Get a list of blacklisted file paths.
protected function getBlacklist ()
* Get a list of whitelisted file paths.
protected function getWhitelist ()
$cmd = 'git ls-files -o -m --exclude-standard -- '. escapeshellarg($this->basedir);
$basedir = $this->basedir;
if (is_dir($basedir) === false ) {
foreach ($output as $path) {
$path = Util\Common ::realpath ($path);
} while ($path !== $basedir);
Documentation generated on Mon, 11 Mar 2019 15:27:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|