Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82495f5

Browse files
committed
Add --no-coverage to all phpspec commands - fixes #30
1 parent d5042cf commit 82495f5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/CodeCoverageExtension.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)