apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Runner

Source Location: /PHP_CodeSniffer-3.0.0a1/src/Runner.php

Class Overview


Responsible for running PHPCS and PHPCBF.


Author(s):

Copyright:

  • 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 22]
Responsible for running PHPCS and PHPCBF.

After creating an object of this class, you probably just want to call runPHPCS() or runPHPCBF().



[ Top ]


Class Variables

$config =  null

[line 30]

The config data for the run.
  • Access: public

Type:   \PHP_CodeSniffer\Config


[ Top ]

$reporter =  null

[line 44]

The reporter used for generating reports after the run.
  • Access: public

Type:   \PHP_CodeSniffer\Reporter


[ Top ]

$ruleset =  null

[line 37]

The ruleset used for the run.
  • Access: public

Type:   \PHP_CodeSniffer\Ruleset


[ Top ]



Method Detail

checkRequirements   [line 198]

array checkRequirements( )

Exits if the minimum requirements of PHP_CodSniffer are not met.
  • Access: public

[ Top ]

handleErrors   [line 540]

void handleErrors( int $code, string $message, string $file, int $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.

  • Access: public

Parameters:

int   $code   —  The level of error raised.
string   $message   —  The error message.
string   $file   —  The path of the file that raised the error.
int   $line   —  The line number the error was raised at.

[ Top ]

runPHPCBF   [line 146]

array runPHPCBF( )

Run the PHPCBF script.
  • Access: public

[ Top ]

runPHPCS   [line 52]

array runPHPCS( )

Run the PHPCS script.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:53:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.