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.

StaticCalling   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A callStatic() 0 6 1
1
<?php
2
3
namespace RattfieldNz\SafeUrls\Libraries\Traits;
4
5
trait StaticCalling
6
{
7
    /**
8
     * Performs a static method call.
9
     *
10
     * Note that parent::class should be used instead of 'parent'
11
     * to refer to the actual parent class.
12
     *
13
     * @param string $className  Name of the class
14
     * @param string $methodName Name of the method
15
     *
16
     * @return mixed
17
     *
18
     * @see https://www.pagemachine.de/blog/mocking-static-method-calls/.
19
     */
20 1
    public function callStatic($className, $methodName)
21
    {
22 1
        $parameters = func_get_args();
23 1
        $parameters = array_slice($parameters, 2); // Remove $className and $methodName
24
25 1
        return call_user_func_array($className.'::'.$methodName, $parameters);
26
    }
27
}
28