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.
Completed
Push — 3.x ( ccef5f...933be5 )
by
unknown
13s queued 10s
created

DeferredCallable::getCallable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Slim Framework (https://slimframework.com)
4
 *
5
 * @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
6
 */
7
8
namespace Slim;
9
10
use Closure;
11
use Psr\Container\ContainerInterface;
12
13
class DeferredCallable
14
{
15
    use CallableResolverAwareTrait;
16
17
    /**
18
     * @var callable|string
19
     */
20
    private $callable;
21
22
    /**
23
     * @var ContainerInterface
24
     */
25
    private $container;
26
27
    /**
28
     * @param callable|string $callable
29
     * @param ContainerInterface $container
30
     */
31
    public function __construct($callable, ContainerInterface $container = null)
32
    {
33
        $this->callable = $callable;
34
        $this->container = $container;
35
    }
36
37
    /**
38
     * @return callable|string
39
     */
40
    public function getCallable()
41
    {
42
        return $this->callable;
43
    }
44
45
    /**
46
     * @return mixed
47
     */
48
    public function __invoke()
49
    {
50
        $callable = $this->resolveCallable($this->callable);
51
        if ($callable instanceof Closure) {
52
            $callable = $callable->bindTo($this->container);
53
        }
54
55
        $args = func_get_args();
56
57
        return call_user_func_array($callable, $args);
58
    }
59
}
60