Passed
Push — master ( 610227...7a4f69 )
by Mr
02:59
created

DatetimeMap::getTestVar()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/data-structure project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\Tests\DataStructure\Fixture;
10
11
use Daikon\DataStructure\TypedMapInterface;
12
use Daikon\DataStructure\TypedMapTrait;
0 ignored issues
show
Bug introduced by
The type Daikon\DataStructure\TypedMapTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
use DateTimeInterface;
14
use stdClass;
15
16
final class DatetimeMap implements TypedMapInterface
17
{
18
    use TypedMapTrait {
19
        __clone as __mapclone;
20
    }
21
22
    private stdClass $testVar;
23
24
    public function __construct(iterable $datetimes = [], stdClass $testVar = null)
25
    {
26
        $this->testVar = $testVar ?? new stdClass;
27
        $this->init($datetimes, [DatetimeInterface::class]);
28
    }
29
30
    public function getTestVar(): stdClass
31
    {
32
        return $this->testVar;
33
    }
34
35
    public function __clone()
36
    {
37
        $this->__mapclone();
38
        $this->testVar = clone $this->testVar;
39
    }
40
}
41