Passed
Push — master ( 28f393...722b81 )
by ྅༻ Ǭɀħ
02:49
created

CommandProvider::getCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * YOURLS Composer Installer
4
 */
5
6
namespace YOURLS\ComposerInstaller;
7
8
use Composer\Plugin\Capability\CommandProvider as CommandProviderCapability;
9
10
/**
11
 * List all custom commands
12
 *
13
 * @package   YOURLS\ComposerInstaller
14
 * @author    Ozh <[email protected]>
15
 * @link      https://github.com/yourls/composer-installer/
16
 * @license   MIT
17
 */
18
class CommandProvider implements CommandProviderCapability
19
{
20
    /**
21
     * Register custom composer commands
22
     */
23 1
    public function getCommands()
24
    {
25
        return [
26 1
            new Commands\CommandAddPlugin(),
27 1
            new Commands\CommandRemovePlugin(),
28
        ];
29
    }
30
}
31