A PHP code sniffer task. Checking the style of one or more PHP source files.
Use \Project#createTask to register a new Task.
author |
Dirk Thomas dirk.thomas@4wdmedia.de |
---|---|
version |
$Id: acbef5e46dea2c4963c4bf345cfb35cf5779d735 $ |
package |
phing.tasks.ext |
addFileSet(\FileSet $fs) : void
createConfig() : \Parameter
createFormatter() : \CodeSniffer_FormatterElement
\CodeSniffer_FormatterElement
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRegisterSlot(string $slotName)
string
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
string
The type of this task (XML Tag)
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws | |
---|---|
log(string $msg, integer $level = \Project::MSG_INFO)
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
outputCustomFormat(array $report)
array
Packaged list of all errors in each file
outputCustomFormatMessages(array $messages, string $type)
array
string
perform()
printErrorReport(\PHP_CodeSniffer $phpcs)
\PHP_CodeSniffer
The PHP_CodeSniffer object containing
the errors.
setAllowedFileExtensions(array $extensions)
array
setDescription(string $desc)
string
The text describing the task
setDocFile(\PhingFile $file) : void
setDocGenerator(string $generator) : void
string
HTML or Text
setEncoding(string $encoding)
string
setFormat(string $format)
string
setHaltonerror(boolean $value)
boolean
setHaltonwarning(boolean $value)
boolean
setIgnorePatterns( $patterns)
setLocation(\Location $location)
setNoSubdirectories(boolean $subdirectories)
boolean
setOwningTarget(\Target $target)
setProject(\Project $project)
setReportWidth(integer $width) : void
integer
How wide the screen reports should be.
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setShowSniffs(boolean $show)
boolean
setShowSources(boolean $show) : void
boolean
Whether to show sources or not
setShowWarnings(boolean $show)
boolean
setSkipVersionCheck(boolean $value)
boolean
setSniffs(string $sniffs)
string
setStandard(string $standard) : void
string
The coding standard
setTabWidth(integer $width)
integer
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
setVerbosity(integer $level)
integer
file :
filesets :
standard :
sniffs :
showWarnings :
showSources :
reportWidth :
verbosity :
tabWidth :
allowedFileExtensions :
ignorePatterns :
noSubdirectories :
configData :
encoding :
showSniffs :
format :
formatters :
docGenerator : string
var |
---|
string
haltonerror :
haltonwarning :
skipversioncheck :
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project