Completed
Push — master ( 7f2568...52038d )
by Emily
02:33
created

Pair   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 22
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
/**
3
 * This file is part of the Composite Utils package.
4
 *
5
 * (c) Emily Shepherd <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the
8
 * LICENSE.md file that was distributed with this source code.
9
 *
10
 * @package spaark/composite-utils
11
 * @author Emily Shepherd <[email protected]>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Model\Collection;
16
17
use Spaark\CompositeUtils\Traits\AllReadableTrait;
18
use Spaark\CompositeUtils\Traits\AutoConstructTrait;
19
20
/**
21
 * @generic KeyType
22
 * @generic ValueType
23
 */
24
class Pair
25
{
26
    use AllReadableTrait;
27
28
    /**
29
     * @var KeyType
30
     * @construct required
31
     */
32
    protected $key;
33
34
    /**
35
     * @var ValueType
36
     * @construct required
37
     */
38
    protected $value;
39
40 22
    public function __construct($key, $value)
41
    {
42 22
        $this->key = $key;
43 22
        $this->value = $value;
44 22
    }
45
}
46
47