Plugin::activate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
namespace Ams\Composer\GitHooks;
4
5
use Composer\Composer;
6
use Composer\IO\IOInterface;
7
use Composer\Plugin\PluginInterface;
8
use Ams\Composer\GitHooks\Installer\GitHooksInstaller;
9
10
class Plugin implements PluginInterface
11
{
12
    const PACKAGE_TYPE = 'git-hook';
13
14 1
    public function activate(Composer $composer, IOInterface $io)
15
    {
16 1
        $installer = new GitHooksInstaller($io, $composer);
17 1
        $composer->getInstallationManager()->addInstaller($installer);
18 1
    }
19
}
20