Completed
Pull Request — master (#29)
by Sandro
06:42
created

PackageDefaultAndMandatoryOptionsConfiguration   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A dimensions() 0 4 1
A defaultOptions() 0 7 1
A mandatoryOptions() 0 6 1
1
<?php
2
/**
3
 * Sandro Keil (https://sandro-keil.de)
4
 *
5
 * @link      http://github.com/sandrokeil/interop-config for the canonical source repository
6
 * @copyright Copyright (c) 2015-2016 Sandro Keil
7
 * @license   http://github.com/sandrokeil/interop-config/blob/master/LICENSE.md New BSD License
8
 */
9
10
namespace InteropTest\Config\TestAsset;
11
12
use Interop\Config\ConfigurationTrait;
13
use Interop\Config\ProvidesDefaultOptions;
14
use Interop\Config\RequiresConfig;
15
use Interop\Config\RequiresMandatoryOptions;
16
17
class PackageDefaultAndMandatoryOptionsConfiguration implements RequiresConfig, ProvidesDefaultOptions, RequiresMandatoryOptions
18
{
19
    use ConfigurationTrait;
20
21
    /**
22
     * @interitdoc
23
     */
24
    public function dimensions()
25
    {
26
        return ['vendor', 'package'];
27
    }
28
29
    /**
30
     * @interitdoc
31
     */
32
    public function defaultOptions()
33
    {
34
        return [
35
            'minLength' => 2,
36
            'maxLength' => 10
37
        ];
38
    }
39
40
    /**
41
     * @interitdoc
42
     */
43
    public function mandatoryOptions()
44
    {
45
        return [
46
            'callback'
47
        ];
48
    }
49
}
50