| 1 | <?php |
||
| 3 | namespace SAML2\Compat; |
||
| 4 | |||
| 5 | use SAML2\Compat\Ssp\Container; |
||
| 6 | |||
| 7 | class ContainerSingleton |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \SAML2\Compat\Ssp\Container |
||
| 11 | */ |
||
| 12 | protected static $container; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return \SAML2\Compat\Ssp\Container |
||
| 16 | */ |
||
| 17 | public static function getInstance() |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Set a container to use. |
||
| 27 | * |
||
| 28 | * @param \SAML2\Compat\AbstractContainer $container |
||
| 29 | * @return \SAML2\Compat\AbstractContainer |
||
| 30 | */ |
||
| 31 | public static function setContainer(AbstractContainer $container) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return \SAML2\Compat\Ssp\Container |
||
| 39 | */ |
||
| 40 | public static function initSspContainer() |
||
| 41 | { |
||
| 45 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.