Test Setup Failed
Push — master ( f687c0...10c0b6 )
by Gabriel
12:32
created

PackageWithConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConfig() 0 4 1
A getPackageConfigName() 0 4 1
1
<?php
2
3
namespace Nip\Config\Tests\Fixtures;
4
5
use Nip\Config\Utils\PackageHasConfigTrait;
6
7
/**
8
 * Class PackageWithConfig
9
 * @package Nip\Config\Tests\Fixtures
10
 */
11
class PackageWithConfig
12
{
13
    use PackageHasConfigTrait;
14
15
    /**
16
     * @param $name
17
     * @param null $default
18
     * @return mixed|\Nip\Config\Config|string|null
19
     */
20
    public function testConfig($name, $default = null)
21
    {
22
        return static::getPackageConfig($name, $default);
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28
    protected static function getPackageConfigName()
29
    {
30
        return 'demo';
31
    }
32
}
33