Completed
Push — master ( 344583...2d30d0 )
by Bogdan
11s
created

DecoratorSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 37
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getArguments() 0 4 1
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of the pinepain/js-sandbox PHP library.
5
 *
6
 * Copyright (c) 2016-2017 Bogdan Padalko <[email protected]>
7
 *
8
 * Licensed under the MIT license: http://opensource.org/licenses/MIT
9
 *
10
 * For the full copyright and license information, please view the
11
 * LICENSE file that was distributed with this source or visit
12
 * http://opensource.org/licenses/MIT
13
 */
14
15
16
namespace Pinepain\JsSandbox\Decorators;
17
18
19
class DecoratorSpec implements DecoratorSpecInterface
20
{
21
    /**
22
     * @var string
23
     */
24
    private $name;
25
    /**
26
     * @var array
27
     */
28
    private $arguments;
29
30
    /**
31
     * @param string $name
32
     * @param array $arguments
33
     */
34 2
    public function __construct(string $name, array $arguments = [])
35
    {
36 2
        $this->name      = $name;
37 2
        $this->arguments = $arguments;
38 2
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43 2
    public function getName(): string
44
    {
45 2
        return $this->name;
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51 2
    public function getArguments(): array
52
    {
53 2
        return $this->arguments;
54
    }
55
}
56