Total Complexity | 4 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class DefaultScopePolicy implements ScopePolicyInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var ConfigurationRepository |
||
20 | */ |
||
21 | protected $configurationRepository; |
||
22 | protected $defaultScopes; |
||
23 | |||
24 | public function __construct(ConfigurationRepository $configurationRepository) |
||
25 | { |
||
26 | $this->configurationRepository = $configurationRepository; |
||
27 | $defaultScopes = $this->configurationRepository->getConfig(Config::DEFAULT_SCOPES); |
||
28 | $this->defaultScopes = is_string($defaultScopes) ? explode(' ', $defaultScopes) : $defaultScopes; |
||
29 | } |
||
30 | |||
31 | |||
32 | function getDefaultScopes(ClientInterface $client): ?array |
||
35 | } |
||
36 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.