TemplateInstallerPlugin::activate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
/**
3
 * Plugins Management
4
 * @author Joe Huss <[email protected]>
5
 * @copyright 2019
6
 * @package MyAdmin
7
 * @category Plugins
8
 */
9
10
namespace MyAdmin\Plugins;
11
12
use Composer\Composer;
13
use Composer\IO\IOInterface;
14
use Composer\Plugin\PluginInterface;
15
16
/**
17
 * Class TemplateInstallerPlugin
18
 *
19
 * @package MyAdmin\Plugins
20
 */
21
class TemplateInstallerPlugin implements PluginInterface
22
{
23
	/**
24
	 * @param \Composer\Composer       $composer
0 ignored issues
show
Bug introduced by
The type Composer\Composer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
	 * @param \Composer\IO\IOInterface $io
0 ignored issues
show
Bug introduced by
The type Composer\IO\IOInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
26
	 */
27
	public function activate(Composer $composer, IOInterface $io)
28
	{
29
		$installer = new TemplateInstaller($io, $composer);
30
		$composer->getInstallationManager()->addInstaller($installer);
31
	}
32
}
33