Completed
Push — master ( 9311e4...366210 )
by Emily
02:13
created

CollectionType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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 <emily@emilyshepherd>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Model\Reflection\Type;
16
17
/**
18
 * Represents a data type which is a collection of items
19
 *
20
 * @property-read AbstractType $of
21
 */
22
class CollectionType extends AbstractType
23
{
24
    /**
25
     * What is this a collection of
26
     *
27
     * @readable
28
     * @var AbstractType
29
     */
30
    protected $of;
31
32
    /**
33
     * Creates the CollectionType of the given subtype
34
     *
35
     * @param AbstractType $of The data type that this is a collection
36
     *     of
37
     */
38
    public function __construct(AbstractType $of)
39
    {
40
        $this->of = $of;
41
    }
42
}
43