PHP_CodeSniffer_CLI::printUsage PHP Method

printUsage() public method

Prints out the usage information for this script.
public printUsage ( ) : void
return void
    public function printUsage()
    {
        if (PHP_CODESNIFFER_CBF === true) {
            $this->printPHPCBFUsage();
        } else {
            $this->printPHPCSUsage();
        }
    }

Usage Example

Example #1
0
 /**
  * Prints out the usage information for this script.
  *
  * @return void
  */
 public function printUsage()
 {
     ob_start();
     parent::printUsage();
     $usage = ob_get_clean();
     $usage = str_replace('phpcs', 'sqlics', $usage);
     $first_eol = strpos($usage, PHP_EOL);
     $first_line = substr($usage, 0, $first_eol);
     $usage = str_replace($first_line, $first_line . ' [--level=<level>]', $usage);
     $usage .= '        <level>      Cut the report severities to one of these values:' . PHP_EOL;
     $usage .= '                     emergency, alert, critical, error, warning, notice, info, debug' . PHP_EOL;
     echo $usage;
 }