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

Class: PHP_CodeSniffer_CLI

Source Location: /PHP_CodeSniffer-1.2.0/CodeSniffer/CLI.php

Class Overview


A class to process command line phpcs scripts.


Author(s):

Version:

  • Release: 1.2.0

Copyright:

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

Methods


Inherited Variables

Inherited Methods


Class Details

[line 33]
A class to process command line phpcs scripts.


[ Top ]


Method Detail

checkRequirements   [line 42]

array checkRequirements( )

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

[ Top ]

getCommandLineValues   [line 106]

array getCommandLineValues( )

Process the command line arguments and returns the values.
  • Access: public

[ Top ]

getDefaults   [line 63]

array getDefaults( )

Get a list of default values for all possible command line arguments.
  • Access: public

[ Top ]

printErrorReport   [line 415]

int printErrorReport( PHP_CodeSniffer $phpcs, string $report, bool $showWarnings, bool $showSources, [string $reportFile = ''])

Prints the error report.
  • Return: The number of error and warning messages shown.
  • Access: public

Parameters:

PHP_CodeSniffer   $phpcs     The PHP_CodeSniffer object containing the errors.
string   $report     The type of report to print.
bool   $showWarnings     TRUE if warnings should also be printed.
bool   $showSources     TRUE if the report should show error sources (not used by all reports).
string   $reportFile     A file to log the report out to.

[ Top ]

printInstalledStandards   [line 540]

void printInstalledStandards( )

Prints out a list of installed coding standards.
  • Access: public

[ Top ]

printUsage   [line 500]

void printUsage( )

Prints out the usage information for this script.
  • Access: public

[ Top ]

process   [line 340]

int process( [array $values = array()])

Runs PHP_CodeSniffer over files are directories.

Parameters:

array   $values     An array of values determined from CLI args.

[ Top ]

processLongArgument   [line 197]

array processLongArgument( string $arg, int $pos, array $values)

Processes a long (--example) command line argument.

Parameters:

string   $arg     The command line argument.
int   $pos     The position of the argument on the command line.
array   $values     An array of values determined from CLI args.

[ Top ]

processShortArgument   [line 151]

array processShortArgument( string $arg, int $pos, array $values)

Processes a sort (-e) command line argument.

Parameters:

string   $arg     The command line argument.
int   $pos     The position of the argument on the command line.
array   $values     An array of values determined from CLI args.

[ Top ]

processUnknownArgument   [line 309]

array processUnknownArgument( string $arg, int $pos, array $values)

Processes an unknown command line argument.

Assumes all unknown arguments are files and folders to check.


Parameters:

string   $arg     The command line argument.
int   $pos     The position of the argument on the command line.
array   $values     An array of values determined from CLI args.

[ Top ]

validateStandard   [line 467]

string validateStandard( string $standard)

Convert the passed standard into a valid standard.

Checks things like default values and case.

  • Access: public

Parameters:

string   $standard     The standard to validate.

[ Top ]


Documentation generated on Mon, 17 Aug 2009 05:00:20 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.