GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (b10c57)
by milkmeowo
02:58
created

AsyncCallback   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
namespace AliyunMNS;
3
4
use AliyunMNS\Exception\MnsException;
5
use AliyunMNS\Responses\BaseResponse;
6
7
class AsyncCallback
8
{
9
    protected $succeedCallback;
10
    protected $failedCallback;
11
12
    public function __construct(callable $succeedCallback, callable $failedCallback)
13
    {
14
        $this->succeedCallback = $succeedCallback;
15
        $this->failedCallback = $failedCallback;
16
    }
17
18
    public function onSucceed(BaseResponse $result)
19
    {
20
        return call_user_func($this->succeedCallback, $result);
21
    }
22
23
    public function onFailed(MnsException $e)
24
    {
25
        return call_user_func($this->failedCallback, $e);
26
    }
27
}
28
29
?>
30