Property | Type | Description | |
---|---|---|---|
$availableRuleSets | array(string) | List of available rule-sets. | |
$coverageReport | string | File name of a PHPUnit code coverage report. | |
$extensions | string | A string of comma-separated extensions for valid php source code filenames. | |
$ignore | string | A string of comma-separated pattern that is used to exclude directories. | |
$ignoreViolationsOnExit | boolean | Should PHPMD exit without error code even if violation is found? | |
$inputPath | string | A php source code filename or directory. | |
$minimumPriority | integer | The minimum rule priority. | |
$reportFile | string | An optional filename for the generated report. | |
$reportFiles | array | Additional report files. | |
$reportFormat | string | The specified report format. | |
$ruleSets | string | A ruleset filename or a comma-separated string of ruleset filenames. | |
$strict | boolean | Should PHPMD run in strict mode? | |
$version | boolean | Should the shell show the current phpmd version? |
Method | Description | |
---|---|---|
__construct ( array $args, array $availableRuleSets = [] ) | Constructs a new command line options instance. | |
createRenderer ( string $reportFormat = null ) : PHPMD\AbstractRenderer | Creates a report renderer instance based on the user's command line argument. | |
getCoverageReport ( ) : string | Returns the file name of a supplied code coverage report or NULL if the user has not supplied the --coverage option. | |
getExtensions ( ) : string | Returns a string of comma-separated extensions for valid php source code filenames or null when this argument was not set. | |
getIgnore ( ) : string | Returns string of comma-separated pattern that is used to exclude directories or null when this argument was not set. | |
getInputPath ( ) : string | Returns a php source code filename or directory. | |
getMinimumPriority ( ) : integer | Returns the minimum rule priority. | |
getReportFile ( ) : string | Returns the output filename for a generated report or null when the report should be displayed in STDOUT. | |
getReportFiles ( ) : array | Returns a hash with report files specified for different renderers. The key represents the report format and the value the report file location. | |
getReportFormat ( ) : string | Returns the specified report format. | |
getRuleSets ( ) : string | Returns a ruleset filename or a comma-separated string of ruleset | |
hasStrict ( ) : boolean | Was the --strict option passed to PHPMD's command line interface? | |
hasVersion ( ) : boolean | Was the --version passed to PHPMD's command line interface? | |
ignoreViolationsOnExit ( ) : boolean | Was the --ignore-violations-on-exit passed to PHPMD's command line interface? | |
usage ( ) : string | Returns usage information for the PHPMD command line interface. |
Method | Description | |
---|---|---|
createCustomRenderer ( ) : PHPMD\AbstractRenderer | ||
createHtmlRenderer ( ) : PHPMD\Renderer\HTMLRenderer | ||
createTextRenderer ( ) : |
||
createXmlRenderer ( ) : |
||
logDeprecated ( string $deprecatedName, string $newName ) : void | Logs a deprecated option to the current user interface. | |
readInputFile ( string $inputFile ) : string | This method takes the given input file, reads the newline separated paths from that file and creates a comma separated string of the file paths. If the given $inputFile not exists, this method will throw an exception. |
public __construct ( array $args, array $availableRuleSets = [] ) | ||
$args | array | |
$availableRuleSets | array |
protected createCustomRenderer ( ) : PHPMD\AbstractRenderer | ||
return | PHPMD\AbstractRenderer |
protected createHtmlRenderer ( ) : PHPMD\Renderer\HTMLRenderer | ||
return | PHPMD\Renderer\HTMLRenderer |
public createRenderer ( string $reportFormat = null ) : PHPMD\AbstractRenderer | ||
$reportFormat | string | |
return | PHPMD\AbstractRenderer |
protected createTextRenderer ( ) : |
||
return |
protected createXmlRenderer ( ) : |
||
return |
public getCoverageReport ( ) : string | ||
return | string |
public getExtensions ( ) : string | ||
return | string |
public getInputPath ( ) : string | ||
return | string |
public getMinimumPriority ( ) : integer | ||
return | integer |
public getReportFile ( ) : string | ||
return | string |
public getReportFiles ( ) : array | ||
return | array |
public getReportFormat ( ) : string | ||
return | string |
public getRuleSets ( ) : string | ||
return | string |
public hasVersion ( ) : boolean | ||
return | boolean |
public ignoreViolationsOnExit ( ) : boolean | ||
return | boolean |
protected readInputFile ( string $inputFile ) : string | ||
$inputFile | string | Specified input file name. |
return | string |
protected array(string) $availableRuleSets | ||
return | array(string) |
protected string $coverageReport | ||
return | string |
protected string $extensions | ||
return | string |
protected string $ignore | ||
return | string |
protected bool $ignoreViolationsOnExit | ||
return | boolean |
protected string $inputPath | ||
return | string |
protected int $minimumPriority | ||
return | integer |
protected string $reportFile | ||
return | string |
protected array $reportFiles | ||
return | array |
protected string $reportFormat | ||
return | string |
protected string $ruleSets | ||
return | string |
protected bool $strict | ||
return | boolean |
protected bool $version | ||
return | boolean |