BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PHP_CodeSniffer\Runner Class Reference

Public Member Functions

 runPHPCS ()
 
 runPHPCBF ()
 
 checkRequirements ()
 
 init ()
 
 handleErrors ($code, $message, $file, $line)
 
 processFile ($file)
 
 printProgress ($file, $numFiles, $numProcessed)
 

Public Attributes

 $config = null
 
 $ruleset = null
 
 $reporter = null
 

Member Function Documentation

PHP_CodeSniffer\Runner::checkRequirements ( )

Exits if the minimum requirements of PHP_CodSniffer are not met.

Returns
array
PHP_CodeSniffer\Runner::handleErrors (   $code,
  $message,
  $file,
  $line 
)

Converts all PHP errors into exceptions.

This method forces a sniff to stop processing if it is not able to handle a specific piece of code, instead of continuing and potentially getting into a loop.

Parameters
int$codeThe level of error raised.
string$messageThe error message.
string$fileThe path of the file that raised the error.
int$lineThe line number the error was raised at.
Returns
void
PHP_CodeSniffer\Runner::init ( )

Init the rulesets and other high-level settings.

Returns
void
PHP_CodeSniffer\Runner::printProgress (   $file,
  $numFiles,
  $numProcessed 
)

Print progress information for a single processed file.

Parameters
File$fileThe file that was processed.
int$numFilesThe total number of files to process.
int$numProcessedThe number of files that have been processed, including this one.
Returns
void
PHP_CodeSniffer\Runner::processFile (   $file)

Processes a single file, including checking and fixing.

Parameters
\PHP_CodeSniffer\Files\File$fileThe file to be processed.
Returns
void
PHP_CodeSniffer\Runner::runPHPCBF ( )

Run the PHPCBF script.

Returns
array
PHP_CodeSniffer\Runner::runPHPCS ( )

Run the PHPCS script.

Returns
array

The documentation for this class was generated from the following file: