CountStat::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Stat\CaseEntity;
4
5
use App\Entity\CaseEntity;
6
use App\Service\CaseService;
7
use Ds\Component\Model\Attribute;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute 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...
8
use Ds\Component\Statistic\Model\Datum;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Statistic\Model\Datum 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...
9
use Ds\Component\Statistic\Stat\Stat;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Statistic\Stat\Stat 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
/**
12
 * Class CountStat
13
 */
14
final class CountStat implements Stat
15
{
16
    use Attribute\Alias;
0 ignored issues
show
Bug introduced by
The type Ds\Component\Model\Attribute\Alias 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...
17
18
    /**
19
     * @var \App\Service\CaseService
20
     */
21
    private $caseService;
22
23
    /**
24
     * Constructor
25
     *
26
     * @param \App\Service\CaseService $caseService
27
     */
28
    public function __construct(CaseService $caseService)
29
    {
30
        $this->caseService = $caseService;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function get(): Datum
37
    {
38
        $datum = new Datum;
39
        $datum
40
            ->setAlias($this->alias)
41
            ->setValue($this->caseService->getRepository()->getCount([]));
42
43
        return $datum;
44
    }
45
}
46