Completed
Push — master ( 79f24a...4b5497 )
by Emily
02:16
created

Pair::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 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\Map;
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 43
    public function __construct($key, $value)
41
    {
42 43
        $this->key = $key;
43 43
        $this->value = $value;
44 43
    }
45
}
46
47