| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PayloadFactory |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Generates success payload. |
||
| 11 | * |
||
| 12 | * @param mixed $data |
||
| 13 | * |
||
| 14 | * @return MessageInterface |
||
|
|
|||
| 15 | */ |
||
| 16 | 3 | public static function success($data): PayloadInterface |
|
| 17 | { |
||
| 18 | 3 | return (new Payload()) |
|
| 19 | 3 | ->setStatus(Status::SUCCESS) |
|
| 20 | 3 | ->setData($data); |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Generates fail payload. |
||
| 25 | * |
||
| 26 | * @param mixed $data |
||
| 27 | * |
||
| 28 | * @return MessageInterface |
||
| 29 | */ |
||
| 30 | 3 | public static function fail($data): PayloadInterface |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Generates error payload. |
||
| 39 | * |
||
| 40 | * @param mixed $data |
||
| 41 | * |
||
| 42 | * @param string $message error message. |
||
| 43 | * @param int $code error code. |
||
| 44 | * @param mixed $data error data, i.e. stack traces. |
||
| 45 | * |
||
| 46 | * @return MessageInterface |
||
| 47 | */ |
||
| 48 | 3 | public static function error(string $message, ?int $code = null, $data = null): PayloadInterface |
|
| 63 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths