aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSt├ęphane HULARD <s.hulard@chstudio.fr>2018-02-02 12:16:17 +0100
committerSt├ęphane HULARD <s.hulard@chstudio.fr>2018-02-02 12:16:17 +0100
commit3f24f8e4544f3f8e595c5f1eaba27adbb0aca463 (patch)
tree9295e5e04bd07f2f4c6e980057b6bcee37a6df00
parente95b4da5f9fb58482818d17ff5363b57a6a92567 (diff)
downloadDevtools-3f24f8e4544f3f8e595c5f1eaba27adbb0aca463.zip
Devtools-3f24f8e4544f3f8e595c5f1eaba27adbb0aca463.tar.gz
Devtools-3f24f8e4544f3f8e595c5f1eaba27adbb0aca463.tar.bz2
feat(debug) CS: Add a flag to enable verbose mode.
Since php-cs-fixer is run using the globally installed binary, we must handle edge case / breaking change between version. To be able to detect those incompatibilities, we must be able to check php-cs-fixer verbose output... See #51.
-rw-r--r--Bin/Cs.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/Bin/Cs.php b/Bin/Cs.php
index 074f006..5f94376 100644
--- a/Bin/Cs.php
+++ b/Bin/Cs.php
@@ -58,7 +58,8 @@ class Cs extends Console\Dispatcher\Kit
['dry-run', Console\GetOption::NO_ARGUMENT, 'd'],
['diff', Console\GetOption::NO_ARGUMENT, 'D'],
['help', Console\GetOption::NO_ARGUMENT, 'h'],
- ['help', Console\GetOption::NO_ARGUMENT, '?']
+ ['help', Console\GetOption::NO_ARGUMENT, '?'],
+ ['verbose', Console\GetOption::NO_ARGUMENT, 'v']
];
@@ -70,8 +71,9 @@ class Cs extends Console\Dispatcher\Kit
*/
public function main()
{
- $dryRun = false;
- $diff = false;
+ $dryRun = false;
+ $diff = false;
+ $verbose = false;
while (false !== $c = $this->getOption($v)) {
switch ($c) {
@@ -85,6 +87,11 @@ class Cs extends Console\Dispatcher\Kit
break;
+ case 'v':
+ $verbose = true;
+
+ break;
+
case 'D':
$diff = true;
@@ -117,6 +124,9 @@ class Cs extends Console\Dispatcher\Kit
if (true === $dryRun) {
$arguments[] = '--dry-run';
}
+ if (true === $verbose) {
+ $arguments[] = '-vvv';
+ }
if (true === $diff) {
$arguments[] = '--diff';