HasIncluded   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
dl 0
loc 31
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setIncluded() 0 5 1
A getIncluded() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VGirol\JsonApiFaker\Factory;
6
7
use VGirol\JsonApiFaker\Contract\CollectionContract;
8
9
/**
10
 * Add "included" member to a factory.
11
 */
12
trait HasIncluded
13
{
14
    /**
15
     * The collection of included resources
16
     *
17
     * @var CollectionContract
18
     */
19
    protected $included;
20
21
    /**
22
     * Sets the included collection.
23
     *
24
     * @param CollectionContract $included
25
     *
26
     * @return static
27
     */
28 6
    public function setIncluded($included)
29
    {
30 6
        $this->included = $included;
31
32 6
        return $this;
33
    }
34
35
    /**
36
     * Gets the included collection.
37
     *
38
     * @return CollectionContract $included
39
     */
40 9
    public function getIncluded()
41
    {
42 9
        return $this->included;
43
    }
44
}
45