SwaggerApiPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A activate() 0 5 1
1
<?php
2
3
/*
4
 * Copyright (C) 2016 Billie Thompson
5
 *
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license.  See the LICENSE.md file for details.
8
 */
9
10
namespace PurpleBooth\JaneOpenApiAutogenerate;
11
12
use Composer\Composer;
13
use Composer\IO\IOInterface;
14
use Composer\Plugin\PluginInterface;
15
16
/**
17
 * Class SwaggerApiPlugin.
18
 */
19
class SwaggerApiPlugin implements PluginInterface
20
{
21
    /**
22
     * Add the installer plugin.
23
     *
24
     * @param Composer    $composer
25
     * @param IOInterface $io
26
     */
27
    public function activate(Composer $composer, IOInterface $io)
28
    {
29
        $installer = new SwaggerApiInstaller($io, $composer);
30
        $composer->getInstallationManager()->addInstaller($installer);
31
    }
32
}
33