Commit: 579e73108a438076f8056ea43d4e06e620815018

Author: David Persson | Date: 2009-12-04 22:55:39 +0100
Documenting `Syntax` command.
diff --git a/extensions/command/Syntax.php b/extensions/command/Syntax.php index 915e70a..c8e35fb 100644 --- a/extensions/command/Syntax.php +++ b/extensions/command/Syntax.php @@ -15,20 +15,43 @@ use lithium\util\String; use \RecursiveIteratorIterator; use \RecursiveDirectoryIterator; +/** + * Runs syntax checks against files. + */ class Syntax extends \lithium\console\Command { + /** + * Comma-separated list of checks to use. + * + * @var string + */ public $checks; - public $project; - + /** + * A regex to exclude paths from being checked. + * + * @var string Regular expression. + */ public $exclude = '\.'; + /** + * Enable output of metrics. + * + * @var boolean + */ public $metrics; + /** + * Enable blaming of each failure. + * + * @var boolean + */ public $blame; protected $_vcs; + public $project; + public function run($file = null) { if (!$this->checks) { $this->help(); @@ -121,13 +144,6 @@ class Syntax extends \lithium\console\Command { } } - public function help() { - $message = 'Usage: li3 syntax [--project=PROJECT] [--exclude=REGEX] '; - $message .= '[--metrics] [--blame] '; - $message .= '--checks=CHECK[,CHECK] [FILE]'; - $this->out($message); - } - protected function _metrics($failures) { $this->header('Metrics'); $this->nl();