@@ -24,12 +24,9 @@ class CodeCoverageExtension implements \PhpSpec\Extension
2424 public function load (ServiceContainer $ container , array $ params = [])
2525 {
2626 foreach ($ container ->getByTag ('console.commands ' ) as $ command ) {
27- if ($ command ->getName () == 'run ' ) {
28- $ command ->addOption ('no-coverage ' , null , InputOption::VALUE_NONE , 'Skip code coverage generation ' );
29- }
27+ $ command ->addOption ('no-coverage ' , null , InputOption::VALUE_NONE , 'Skip code coverage generation ' );
3028 }
3129
32- 3330 $ container ->define ('code_coverage.filter ' , function () {
3431 return new Filter ();
3532 });
@@ -107,7 +104,7 @@ public function load(ServiceContainer $container, array $params = [])
107104
108105 $ skipCoverage = false ;
109106 $ input = $ container ->get ('console.input ' );
110- if (! $ input ->hasOption ('no-coverage ' ) || $ input ->getOption ('no-coverage ' )) {
107+ if ($ input ->hasOption ('no-coverage ' ) && $ input ->getOption ('no-coverage ' )) {
111108 $ skipCoverage = true ;
112109 }
113110
0 commit comments