Conditions | 3 |
Paths | 3 |
Total Lines | 27 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
19 | public static function listen() { |
||
20 | if ( ! filter_has_var( INPUT_GET, 'nocks_webhook' ) ) { |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | $transaction_id = file_get_contents( 'php://input' ); |
||
25 | |||
26 | $payment = get_pronamic_payment_by_transaction_id( $transaction_id ); |
||
27 | |||
28 | if ( null === $payment ) { |
||
29 | return; |
||
30 | } |
||
31 | |||
32 | // Add note. |
||
33 | $note = sprintf( |
||
34 | /* translators: %s: Nocks */ |
||
35 | __( 'Webhook requested by %s.', 'pronamic_ideal' ), |
||
36 | __( 'Nocks', 'pronamic_ideal' ) |
||
37 | ); |
||
38 | |||
39 | $payment->add_note( $note ); |
||
40 | |||
41 | // Log webhook request. |
||
42 | WebhookManager::log_payment( $payment ); |
||
43 | |||
44 | // Update payment. |
||
45 | Plugin::update_payment( $payment, false ); |
||
46 | } |
||
48 |
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