1 | <?php |
||
18 | final class AbacFactory |
||
19 | { |
||
20 | /** @var ConfigurationInterface **/ |
||
21 | protected static $configuration; |
||
22 | /** @var PolicyRuleManagerInterface **/ |
||
23 | protected static $policyRuleManager; |
||
24 | /** @var AttributeManagerInterface **/ |
||
25 | protected static $attributeManager; |
||
26 | /** @var CacheManagerInterface **/ |
||
27 | protected static $cacheManager; |
||
28 | /** @var ComparisonManagerInterface **/ |
||
29 | protected static $comparisonManager; |
||
30 | |||
31 | public static function setConfiguration(ConfigurationInterface $configuration) |
||
35 | |||
36 | public static function setPolicyRuleManager(PolicyRuleManagerInterface $policyRuleManager) |
||
40 | |||
41 | public static function setAttributeManager(AttributeManagerInterface $attributeManager) |
||
45 | |||
46 | public static function setCacheManager(CacheManagerInterface $cacheManager) |
||
50 | |||
51 | public static function setComparisonManager(ComparisonManagerInterface $comparisonManager) |
||
55 | |||
56 | 4 | public static function getAbac(array $configurationFiles, string $configDir = null, array $attributeOptions = [], array $cacheOptions = []) |
|
66 | } |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.