Plugin::activate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

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
1
<?php
2
3
4
namespace SunshineCMS\Installers;
5
6
use Composer\Composer;
7
use Composer\IO\IOInterface;
8
use Composer\Plugin\PluginInterface;
9
10
/**
11
 * Composer Library Installer Plugin for SunshineCMS.
12
 *
13
 * Handles the installation of SunshineCMS core, plugins,
14
 * themes and other extensions.
15
 *
16
 * @since 1.0.0
17
 *
18
 * @author  SunshineCMS Authors & Developers
19
 * @license GPL-3.0-or-later
20
 *
21
 * @package SunshineCMS\Installers
22
 */
23
class Plugin implements PluginInterface
24
{
25
    /**
26
     * Activates installer.
27
     *
28
     * Activates the installer plugin for SunshineCMS.
29
     *
30
     * @param Composer             $composer
31
     * @param IOInterface          $io
32
     *
33
     * @retutrn void
34
     *
35
     * @codeCoverageIgnore
36
     */
37
    public function activate(Composer $composer, IOInterface $io)
38
    {
39
        $installer = new Installer($io, $composer);
40
        $composer->getInstallationManager()->addInstaller($installer);
41
    }
42
}
43