Issues (17)

src/Exceptions/Exception.php (2 issues)

1
<?php
2
3
namespace Yansongda\LaravelApi\Exceptions;
4
5
class Exception extends \Exception
6
{
7
    /**
8
     * Report the exception.
9
     *
10
     * @return void
11
     */
12
    public function report()
13
    {
14
        //
15
    }
16
17
    /**
18
     * Render the exception to http request.
19
     *
20
     * @param  \Illuminate\Http\Request
21
     * @return void
22
     */
23
    public function render($request)
0 ignored issues
show
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

23
    public function render(/** @scrutinizer ignore-unused */ $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
    {
25
        return response()->json([
0 ignored issues
show
The function response was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        return /** @scrutinizer ignore-call */ response()->json([
Loading history...
26
            'code' => $this->getCode(),
27
            'message' => $this->getMessage(),
28
        ]);
29
    }
30
}
31