| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 3 | public static function create($stage) |
|
| 25 | { |
||
| 26 | 3 | if (is_object($stage)) { |
|
| 27 | 1 | return new self(sprintf( |
|
| 28 | 1 | 'Object [%s] is not valid stage. Please check __invoke() implementation.', |
|
| 29 | 1 | get_class($stage) |
|
| 30 | 1 | )); |
|
| 31 | } |
||
| 32 | |||
| 33 | 2 | return new self(sprintf('Invalid stage implementation detected. Probably stage is not callable.')); |
|
| 34 | } |
||
| 35 | } |
||
| 36 |