Issues (6)

src/Response/ExceptionConverterInterface.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace jin2chen\ApiBundle\Response;
6
7
use Throwable;
8
9
/**
10
 * @psalm-type ExceptionResponseArray = array{
11
 *     status: int,
12
 *     code: int,
13
 *     message: string,
14
 *     errors?: array
15
 * }
16
 */
17
interface ExceptionConverterInterface
18
{
19
    /**
20
     * Convert the exception to an array of message parameters.
21
     *  * status - the HTTP status code
22
     *  * code - error code or business code
23
     *  * message - the error message to display
24
     *  * errors - an array of key -> value pairs of error data (optional)
25
     *
26
     * @param Throwable $e
27
     *
28
     * @return ExceptionResponseArray
0 ignored issues
show
The type jin2chen\ApiBundle\Response\ExceptionResponseArray was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
     */
30
    public function convert(Throwable $e): array;
31
}
32