QueriedModelPropertyDataManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
namespace WebTheory\Saveyour\Data;
4
5
use WebTheory\Saveyour\Abstracts\QueriesRepositoryTrait;
6
use WebTheory\Saveyour\Contracts\Data\FieldDataManagerInterface;
7
use WebTheory\Saveyour\Data\Abstracts\AbstractQueriedModelDataManager;
8
use WebTheory\Saveyour\Data\Abstracts\ManagesModelPropertyTrait;
9
use WebTheory\Saveyour\Enum\ServerRequestLocation;
0 ignored issues
show
Bug introduced by
The type WebTheory\Saveyour\Enum\ServerRequestLocation 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...
10
11
class QueriedModelPropertyDataManager extends AbstractQueriedModelDataManager implements FieldDataManagerInterface
12
{
13
    use ManagesModelPropertyTrait;
14
    use QueriesRepositoryTrait;
15
16
    public function __construct(
17
        string $property,
18
        object $repository,
19
        string $queryMethod,
20
        string $lookup,
21
        ?ServerRequestLocation $location = null,
22
        ?string $updateMethod = null,
23
        ?string $commitMethod = null
24
    ) {
25
        $this->repository = $repository;
26
        $this->property = $property;
27
        $this->queryMethod = $queryMethod;
28
        $this->lookup = $lookup;
29
        $this->location = $location ?? ServerRequestLocation::Attribute();
30
        $this->updateMethod = $updateMethod;
31
        $this->commitMethod = $commitMethod;
32
    }
33
}
34