PHP Class Overtrue\PHPLint\Linter

Show file Open project: overtrue/phplint Class Usage Examples

Public Methods

Method Description
__construct ( string | array $path, array $excludes = [], array $extensions = ['php'] ) Constructor.
getFiles ( ) : array Fetch files.
lint ( array $files = [], boolean $cache = true ) : array Check the files.
setCache ( array $cache = [] ) Cache setter.
setFiles ( array $files ) : Linter Set Files.
setProcessCallback ( callable $processCallback ) : Linter Set process callback.
setProcessLimit ( integer $procLimit ) Set process limit.

Protected Methods

Method Description
getFilesFromDir ( string $dir ) : array Get files from directory.

Method Details

__construct() public method

Constructor.
public __construct ( string | array $path, array $excludes = [], array $extensions = ['php'] )
$path string | array
$excludes array
$extensions array

getFiles() public method

Fetch files.
public getFiles ( ) : array
return array

getFilesFromDir() protected method

Get files from directory.
protected getFilesFromDir ( string $dir ) : array
$dir string
return array

lint() public method

Check the files.
public lint ( array $files = [], boolean $cache = true ) : array
$files array
$cache boolean
return array

setCache() public method

Cache setter.
public setCache ( array $cache = [] )
$cache array

setFiles() public method

Set Files.
public setFiles ( array $files ) : Linter
$files array
return Linter

setProcessCallback() public method

Set process callback.
public setProcessCallback ( callable $processCallback ) : Linter
$processCallback callable
return Linter

setProcessLimit() public method

Set process limit.
public setProcessLimit ( integer $procLimit )
$procLimit integer