| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function getProfileContext() |
||
| 23 | { |
||
| 24 | $result = $this; |
||
| 25 | while ($result && false == $result instanceof ProfileContext) { |
||
|
|
|||
| 26 | $result = $result->getParent(); |
||
| 27 | } |
||
| 28 | |||
| 29 | if ($result) { |
||
| 30 | return $result; |
||
| 31 | } |
||
| 32 | |||
| 33 | throw new LightSamlContextException($this, 'Missing ProfileContext'); |
||
| 34 | } |
||
| 36 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.