Skip to content
This repository was archived by the owner on Oct 19, 2020. It is now read-only.

Commit 40ea822

Browse files
committed
Fixed PHPMD.CouplingBetweenObjects
1 parent 15b98af commit 40ea822

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/Command/Provider.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Webs\QA\Command\Test\Test as Test;
2323

2424
/**
25-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25+
* Provider of commands for plugin
2626
*/
2727
class Provider implements CommandProviderCapability
2828
{
@@ -33,19 +33,23 @@ class Provider implements CommandProviderCapability
3333
*/
3434
public function getCommands()
3535
{
36-
return array(
37-
new CodeBeautifierFixer(),
38-
new CodeCoverage(),
39-
new CodeSniffer(),
40-
new CopyPasteDetector(),
41-
new Fixer(),
42-
new LineOfCode(),
43-
new MessDetector(),
44-
new ParaTest(),
45-
new PHPCSFixer(),
46-
new PHPMetrics(),
47-
new SecurityChecker(),
48-
new Test()
36+
$short = new ProviderShort();
37+
return array_merge(
38+
$short->getCommands(),
39+
array(
40+
new CodeBeautifierFixer(),
41+
new CodeCoverage(),
42+
new CodeSniffer(),
43+
new CopyPasteDetector(),
44+
new Fixer(),
45+
new LineOfCode(),
46+
new MessDetector(),
47+
new ParaTest(),
48+
new PHPCSFixer(),
49+
new PHPMetrics(),
50+
new SecurityChecker(),
51+
new Test()
52+
)
4953
);
5054
}
5155
}

src/Plugin.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function activate(Composer $composer, IOInterface $style)
3131
public function getCapabilities()
3232
{
3333
return array(
34-
'Composer\Plugin\Capability\CommandProvider' => 'Webs\QA\Command\Provider',
35-
'Composer\Plugin\Capability\CommandProvider' => 'Webs\QA\Command\ProviderShort'
34+
'Composer\Plugin\Capability\CommandProvider' => 'Webs\QA\Command\Provider'
3635
);
3736
}
3837
}

0 commit comments

Comments
 (0)