PHP 클래스 PHPMD\TextUI\CommandLineOptions

저자: Manuel Pichler ([email protected])
파일 보기 프로젝트 열기: phpmd/phpmd 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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?

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
createCustomRenderer ( ) : PHPMD\AbstractRenderer
createHtmlRenderer ( ) : PHPMD\Renderer\HTMLRenderer
createTextRenderer ( ) : XMLRenderer
createXmlRenderer ( ) : XMLRenderer
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.

메소드 상세

__construct() 공개 메소드

Constructs a new command line options instance.
public __construct ( array $args, array $availableRuleSets = [] )
$args array
$availableRuleSets array

createCustomRenderer() 보호된 메소드

protected createCustomRenderer ( ) : PHPMD\AbstractRenderer
리턴 PHPMD\AbstractRenderer

createHtmlRenderer() 보호된 메소드

protected createHtmlRenderer ( ) : PHPMD\Renderer\HTMLRenderer
리턴 PHPMD\Renderer\HTMLRenderer

createRenderer() 공개 메소드

Valid renderers are:
  • xml
  • html
  • text
public createRenderer ( string $reportFormat = null ) : PHPMD\AbstractRenderer
$reportFormat string
리턴 PHPMD\AbstractRenderer

createTextRenderer() 보호된 메소드

protected createTextRenderer ( ) : XMLRenderer
리턴 PHPMD\Renderer\XMLRenderer

createXmlRenderer() 보호된 메소드

protected createXmlRenderer ( ) : XMLRenderer
리턴 PHPMD\Renderer\XMLRenderer

getCoverageReport() 공개 메소드

Returns the file name of a supplied code coverage report or NULL if the user has not supplied the --coverage option.
public getCoverageReport ( ) : string
리턴 string

getExtensions() 공개 메소드

Returns a string of comma-separated extensions for valid php source code filenames or null when this argument was not set.
public getExtensions ( ) : string
리턴 string

getIgnore() 공개 메소드

Returns string of comma-separated pattern that is used to exclude directories or null when this argument was not set.
public getIgnore ( ) : string
리턴 string

getInputPath() 공개 메소드

Returns a php source code filename or directory.
public getInputPath ( ) : string
리턴 string

getMinimumPriority() 공개 메소드

Returns the minimum rule priority.
public getMinimumPriority ( ) : integer
리턴 integer

getReportFile() 공개 메소드

Returns the output filename for a generated report or null when the report should be displayed in STDOUT.
public getReportFile ( ) : string
리턴 string

getReportFiles() 공개 메소드

Returns a hash with report files specified for different renderers. The key represents the report format and the value the report file location.
public getReportFiles ( ) : array
리턴 array

getReportFormat() 공개 메소드

Returns the specified report format.
public getReportFormat ( ) : string
리턴 string

getRuleSets() 공개 메소드

Returns a ruleset filename or a comma-separated string of ruleset
public getRuleSets ( ) : string
리턴 string

hasStrict() 공개 메소드

Was the --strict option passed to PHPMD's command line interface?
부터: 1.2.0
public hasStrict ( ) : boolean
리턴 boolean

hasVersion() 공개 메소드

Was the --version passed to PHPMD's command line interface?
public hasVersion ( ) : boolean
리턴 boolean

ignoreViolationsOnExit() 공개 메소드

Was the --ignore-violations-on-exit passed to PHPMD's command line interface?
public ignoreViolationsOnExit ( ) : boolean
리턴 boolean

logDeprecated() 보호된 메소드

Logs a deprecated option to the current user interface.
protected logDeprecated ( string $deprecatedName, string $newName ) : void
$deprecatedName string
$newName string
리턴 void

readInputFile() 보호된 메소드

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.
부터: 1.1.0
protected readInputFile ( string $inputFile ) : string
$inputFile string Specified input file name.
리턴 string

usage() 공개 메소드

Returns usage information for the PHPMD command line interface.
public usage ( ) : string
리턴 string

프로퍼티 상세

$availableRuleSets 보호되어 있는 프로퍼티

List of available rule-sets.
protected array(string) $availableRuleSets
리턴 array(string)

$coverageReport 보호되어 있는 프로퍼티

File name of a PHPUnit code coverage report.
protected string $coverageReport
리턴 string

$extensions 보호되어 있는 프로퍼티

A string of comma-separated extensions for valid php source code filenames.
protected string $extensions
리턴 string

$ignore 보호되어 있는 프로퍼티

A string of comma-separated pattern that is used to exclude directories.
protected string $ignore
리턴 string

$ignoreViolationsOnExit 보호되어 있는 프로퍼티

Should PHPMD exit without error code even if violation is found?
protected bool $ignoreViolationsOnExit
리턴 boolean

$inputPath 보호되어 있는 프로퍼티

A php source code filename or directory.
protected string $inputPath
리턴 string

$minimumPriority 보호되어 있는 프로퍼티

The minimum rule priority.
protected int $minimumPriority
리턴 integer

$reportFile 보호되어 있는 프로퍼티

An optional filename for the generated report.
protected string $reportFile
리턴 string

$reportFiles 보호되어 있는 프로퍼티

Additional report files.
protected array $reportFiles
리턴 array

$reportFormat 보호되어 있는 프로퍼티

The specified report format.
protected string $reportFormat
리턴 string

$ruleSets 보호되어 있는 프로퍼티

A ruleset filename or a comma-separated string of ruleset filenames.
protected string $ruleSets
리턴 string

$strict 보호되어 있는 프로퍼티

Should PHPMD run in strict mode?
부터: 1.2.0
protected bool $strict
리턴 boolean

$version 보호되어 있는 프로퍼티

Should the shell show the current phpmd version?
protected bool $version
리턴 boolean