Skip to content

Commit e1c2e1c

Browse files
author
Dan Cryer
committed
Updating Symfony console version
1 parent 41e4272 commit e1c2e1c

File tree

3 files changed

+257
-1082
lines changed

3 files changed

+257
-1082
lines changed

PhpDocblockChecker/CheckerCommand.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class CheckerCommand extends Command
5757
*/
5858
protected $output;
5959

60+
/**
61+
* Configure the console command, add options, etc.
62+
*/
6063
protected function configure()
6164
{
6265
$this
@@ -70,6 +73,12 @@ protected function configure()
7073
->addOption('json', 'j', InputOption::VALUE_NONE, 'Output JSON instead of a log.');
7174
}
7275

76+
/**
77+
* Execute the actual docblock checker.
78+
* @param InputInterface $input
79+
* @param OutputInterface $output
80+
* @return int
81+
*/
7382
protected function execute(InputInterface $input, OutputInterface $output)
7483
{
7584
// Process options:
@@ -103,6 +112,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
103112
return count($this->report) ? 1 : 0;
104113
}
105114

115+
/**
116+
* Iterate through a directory and check all of the PHP files within it.
117+
* @param string $path
118+
*/
106119
protected function processDirectory($path = '')
107120
{
108121
$dir = new DirectoryIterator($this->basePath . $path);
@@ -128,6 +141,10 @@ protected function processDirectory($path = '')
128141
}
129142
}
130143

144+
/**
145+
* Check a specific PHP file for errors.
146+
* @param $file
147+
*/
131148
protected function processFile($file)
132149
{
133150
$stream = new PHP_Token_Stream($this->basePath . $file);

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
"require": {
2525
"php": ">=5.3.3",
2626
"phpunit/php-token-stream": "1.*",
27-
"symfony/console": "~2.1"
27+
"symfony/console": "3.*"
2828
},
2929

3030
"require-dev": {
3131
"phpmd/phpmd": "~2.0",
3232
"squizlabs/php_codesniffer": "~1.5",
33-
"phploc/phploc": "~2.0",
34-
"kherge/box": "~2.0"
33+
"phploc/phploc": "~2.0"
3534
},
3635

3736
"bin": [

0 commit comments

Comments
 (0)