NamespaceConfigExtractor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 9 2
1
<?php
2
/**
3
 * Copyright © Vaimo Group. All rights reserved.
4
 * See LICENSE_VAIMO.txt for license details.
5
 */
6
namespace Vaimo\ComposerPatches\Package\ConfigExtractors;
7
8
use Vaimo\ComposerPatches\Composer\ConfigKeys as ComposerConfig;
9
10
class NamespaceConfigExtractor implements \Vaimo\ComposerPatches\Interfaces\PackageConfigExtractorInterface
11
{
12
    public function getConfig(\Composer\Package\PackageInterface $package, $configKey)
13
    {
14
        $autoload = $package->getAutoload();
15
16
        if (!isset($autoload[ComposerConfig::PSR4_CONFIG])) {
17
            return array();
18
        }
19
20
        return array_keys($autoload[ComposerConfig::PSR4_CONFIG]);
21
    }
22
}
23