| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | 2 | private function isValidServiceDefinition(Definition $definition) : bool |
|
| 48 | { |
||
| 49 | 2 | if ($definition->isAbstract()) { |
|
| 50 | 2 | return false; |
|
| 51 | } |
||
| 52 | |||
| 53 | 2 | if (! $definition->isPublic()) { |
|
| 54 | 2 | return false; |
|
| 55 | } |
||
| 56 | |||
| 57 | 2 | if (! $definition->getClass()) { |
|
|
|
|||
| 58 | 2 | return false; |
|
| 59 | } |
||
| 60 | |||
| 61 | 2 | return true; |
|
| 62 | } |
||
| 63 | } |
||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: