Completed
Push — master ( 02da02...be0985 )
by De Cramer
17s queued 12s
created

SimpleScopeResolver::initScopes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @author    oliverde8<[email protected]>
4
 * @category  @category  oliverde8/ComfyBundle
5
 */
6
7
namespace oliverde8\ComfyBundle\Resolver;
8
9
use oliverde8\AssociativeArraySimplified\AssociativeArray;
0 ignored issues
show
Bug introduced by
The type oliverde8\AssociativeArr...lified\AssociativeArray 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 SimpleScopeResolver extends AbstractScopeResolver implements ScopeResolverInterface
12
{
13
    /** @var string */
14
    protected string $defaultScope;
15
16
    /** @var array */
17
    protected array $scopes;
18
19
    /**
20
     * SimpleScopeResolver constructor.
21
     *
22
     * @param string $defaultScope
23
     * @param array $scopes
24
     */
25
    public function __construct(string $defaultScope, array $scopes)
26
    {
27
        $this->defaultScope = $defaultScope;
28
        $this->scopes = $scopes;
29
    }
30
31
32
    /**
33
     * @inheritDoc
34
     */
35
    public function getCurrentScope(): string
36
    {
37
        return $this->defaultScope;
38
    }
39
40
    /**
41
     * @inheritDoc
42
     */
43
    protected function initScopes(): array
44
    {
45
        return $this->scopes;
46
    }
47
}
48