Plugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A activate() 0 5 1
1
<?php
2
/**
3
 * Twig Bundle Installer
4
 *
5
 * @link      https://nystudio107.com/
6
 * @copyright Copyright (c) 2020 nystudio107
7
 */
8
9
namespace nystudio107\composer;
10
11
use Composer\Composer;
12
use Composer\IO\IOInterface;
13
use Composer\Plugin\PluginInterface;
14
15
/**
16
 * Class Plugin
17
 *
18
 * Plugin is the Composer plugin that handles packages of the type: twig-bundle
19
 *
20
 * @author    nystudio107
21
 * @package   bundle-installer
22
 * @since     1.0.0
23
 */
24
class Plugin implements PluginInterface
25
{
26
    // Public Methods
27
    // =========================================================================
28
29
    /**
30
     * @inheritdoc
31
     */
32
    public function activate(Composer $composer, IOInterface $io)
33
    {
34
        // Register the plugin installer
35
        $installer = new Installer($io, $composer);
36
        $composer->getInstallationManager()->addInstaller($installer);
37
    }
38
}
39