Completed
Push — wip-public-release ( 7c11a5...54ec9d )
by Bogdan
05:19
created

BindingSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 37
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getSpec() 0 4 1
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of the pinepain/php-v8 PHP extension.
5
 *
6
 * Copyright (c) 2015-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
namespace Pinepain\JsSandbox\Specs;
16
17
18
class BindingSpec implements BindingSpecInterface
19
{
20
    /**
21
     * @var string
22
     */
23
    private $name;
24
    /**
25
     * @var FunctionSpecInterface|PropertySpecInterface
26
     */
27
    private $spec;
28
29
    /**
30
     * @param string $name
31
     * @param PropertySpecInterface|FunctionSpecInterface$spec
32
     */
33
    public function __construct(string $name, $spec)
34
    {
35
        $this->name = $name;
36
        $this->spec = $spec;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getName(): string
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getSpec()
51
    {
52
        return $this->spec;
53
    }
54
}
55