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
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Stat\Organization;
4
5
use App\Service\OrganizationService;
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\OrganizationService
19
     */
20
    private $organizationService;
21
22
    /**
23
     * Constructor
24
     *
25
     * @param \App\Service\OrganizationService $organizationService
26
     */
27
    public function __construct(OrganizationService $organizationService)
28
    {
29
        $this->organizationService = $organizationService;
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->organizationService->getRepository()->getCount([]));
41
42
        return $datum;
43
    }
44
}
45