Installer::getVendorPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Bluz composer installer
5
 *
6
 * @copyright Bluz PHP Team
7
 * @link https://github.com/bluzphp/composer-plugin
8
 */
9
10
/**
11
 * @namespace
12
 */
13
namespace Bluz\Composer\Installers;
14
15
use Composer\Installer\LibraryInstaller;
16
use Composer\IO\IOInterface;
17
use Composer\Package\PackageInterface;
18
19
/**
20
 * Class Installer
21
 *
22
 * @package Bluz\Composer\Installers
23
 */
24
class Installer extends LibraryInstaller
25
{
26
    protected $vendorPath;
27
28
    /**
29
     * Get path to the installation package
30
     *
31
     * {@inheritDoc}
32
     */
33
    public function getInstallPath(PackageInterface $package): string
34
    {
35
        $this->vendorPath = parent::getInstallPath($package);
36
        return $this->vendorPath;
37
    }
38
39
    /**
40
     * Check type of the plugin
41
     *
42
     * {@inheritDoc}
43
     */
44
    public function supports($packageType): bool
45
    {
46
        return $packageType === 'bluz-module';
47
    }
48
49
    /**
50
     * Get inputOutput instance
51
     */
52
    public function getIo(): IOInterface
53
    {
54
        return $this->io;
55
    }
56
57
    /**
58
     * Get path to current vendor
59
     */
60
    public function getVendorPath()
61
    {
62
        return $this->vendorPath;
63
    }
64
}
65