CountStat   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Stat\Staff;
4
5
use App\Service\StaffService;
6
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...
7
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...
8
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...
9
10
/**
11
 * Class CountStat
12
 */
13
final class CountStat implements Stat
14
{
15
    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...
16
17
    /**
18
     * @var \App\Service\StaffService
19
     */
20
    private $staffService;
21
22
    /**
23
     * Constructor
24
     *
25
     * @param \App\Service\StaffService $staffService
26
     */
27
    public function __construct(StaffService $staffService)
28
    {
29
        $this->staffService = $staffService;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function get(): Datum
36
    {
37
        $datum = new Datum;
38
        $datum
39
            ->setAlias($this->alias)
40
            ->setValue($this->staffService->getRepository()->getCount([]));
41
42
        return $datum;
43
    }
44
}
45