Nestednet /
gocardless-laravel
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * Created by PhpStorm. |
||||
| 4 | * User: eudaldarranztresserra |
||||
| 5 | * Date: 2019-03-01 |
||||
| 6 | * Time: 13:07 |
||||
| 7 | */ |
||||
| 8 | |||||
| 9 | namespace Nestednet\Gocardless\Controllers; |
||||
| 10 | |||||
| 11 | use Exception; |
||||
| 12 | use Illuminate\Http\Request; |
||||
|
0 ignored issues
–
show
|
|||||
| 13 | use Illuminate\Routing\Controller; |
||||
|
0 ignored issues
–
show
The type
Illuminate\Routing\Controller 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||
| 14 | use Nestednet\Gocardless\Middlewares\VerifySignature; |
||||
| 15 | |||||
| 16 | class GocardlessWebhookController extends Controller |
||||
| 17 | { |
||||
| 18 | public function __construct() |
||||
| 19 | { |
||||
| 20 | $this->middleware(VerifySignature::class); |
||||
| 21 | } |
||||
| 22 | |||||
| 23 | public function __invoke(Request $request) |
||||
| 24 | { |
||||
| 25 | $payload = $request->input(); |
||||
| 26 | $modelClass = config('gocardless.webhooks.model'); |
||||
|
0 ignored issues
–
show
The function
config 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
Loading history...
|
|||||
| 27 | |||||
| 28 | foreach ($payload['events'] as $event) { |
||||
| 29 | $gocardlessWebhookCall = $modelClass::create([ |
||||
| 30 | 'resource_type' => $event['resource_type'] ?? '', |
||||
| 31 | 'action' => $event['action'] ?? '', |
||||
| 32 | 'payload' => $event, |
||||
| 33 | ]); |
||||
| 34 | |||||
| 35 | try { |
||||
| 36 | $gocardlessWebhookCall->process(); |
||||
| 37 | } catch (Exception $exception) { |
||||
| 38 | $gocardlessWebhookCall->saveException($exception); |
||||
| 39 | //Improve the way we handle the exceptions here, add the option to notify the exceptions. |
||||
| 40 | } |
||||
| 41 | } |
||||
| 42 | |||||
| 43 | return response()->json(['message' => 'ok']); |
||||
|
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
Loading history...
|
|||||
| 44 | } |
||||
| 45 | } |
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