Completed
Push — master ( 158640...6228b6 )
by Carlos
02:38 queued 01:15
created

src/Payment/Notify/Paid.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyWeChat\Payment\Notify;
13
14
use Symfony\Component\HttpFoundation\Response;
15
16
class Paid extends Handler
17
{
18
    /**
19
     * @param callable $callback
20
     *
21
     * @return \Symfony\Component\HttpFoundation\Response
22
     */
23
    public function handle(callable $callback): Response
24
    {
25
        $this->strict(
26
            $callback->__invoke($this->getMessage(), [$this, 'fail'])
0 ignored issues
show
The method __invoke cannot be called on $callback (of type callable).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
27
        );
28
29
        return $this->toResponse();
30
    }
31
}
32