Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| NotificationType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| fromString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Enum; |
| 4 | |
| 5 | /** |
| 6 | * @author Wilhelm Zwertvaegher |
| 7 | */ |
| 8 | enum NotificationType: string implements Enum |
| 9 | { |
| 10 | case CONTACT = 'contact'; |
| 11 | case REPORT = 'report'; |
| 12 | case SUGGESTION = 'suggestion'; |
| 13 | |
| 14 | public static function fromString(string $value): Enum |
| 15 | { |
| 16 | return self::from(strtoupper($value)); |
| 17 | } |
| 18 | } |
Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not
necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once.
Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 14 | public static function fromString(string $value): Enum |
| 15 | { |
| 16 | return self::from(strtoupper($value)); |
| 17 | } |
| 3 | namespace App\Enum; |
| 4 | |
| 5 | /** |
| 6 | * @author Wilhelm Zwertvaegher |
| 7 | */ |
| 8 | enum NotificationType: string implements Enum |
| 9 | { |
| 10 | case CONTACT = 'contact'; |
| 11 | case REPORT = 'report'; |
| 12 | case SUGGESTION = 'suggestion'; |
| 13 | |
| 14 | public static function fromString(string $value): Enum |
| 15 | { |
| 16 | return self::from(strtoupper($value)); |
| 17 | } |