AbstractVo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A toValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MinimalVo\BaseValueObject;
6
7
/**
8
* @template TValue
9
* @template TVo
10
* @template-implements ValueObjectInterface<TValue,TVo>
11
*/
12
abstract class AbstractVo implements ValueObjectInterface
13
{
14
    /** @param TValue $value */
0 ignored issues
show
Bug introduced by
The type MinimalVo\BaseValueObject\TValue 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...
15
    public function __construct(protected $value)
16
    {
17
        $this->valid();
18
    }
19
20
    abstract protected function valid(): bool;
21
22
    /** @return TValue */
23
    public function toValue()
24
    {
25
        return $this->value;
26
    }
27
}
28