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.

YiiDebug::getClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * YiiDebug class file.
4
 *
5
 * @author Sergey Malyshev <[email protected]>
6
 */
7
8
9
/**
10
 * YiiDebug class.
11
 *
12
 * @author Sergey Malyshev <[email protected]>
13
 * @version $Id$
14
 * @package YiiDebugToolbar
15
 * @since 1.1.7
16
 */
17
18
class YiiDebug extends CComponent
19
{
20
21
    /**
22
     * Displays a variable.
23
     * This method achieves the similar functionality as var_dump and print_r
24
     * but is more robust when handling complex objects such as Yii controllers.
25
     * @param mixed $var variable to be dumped
26
     */
27
    public static function dump($var, $depth=10)
28
    {
29
        is_string($var) && $var = trim($var);
30
        echo str_replace('&nbsp;', ' ', CVarDumper::dumpAsString($var, $depth, true));
31
    }
32
33
    /**
34
     * Writes a trace dump.
35
     * @param string $msg message to be logged
0 ignored issues
show
Bug introduced by
There is no parameter named $msg. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
36
     */
37
    public static function trace($message)
38
    {
39
        Yii::trace(self::dump($message), 'dump');
40
    }
41
42
    public static function getClass($class)
43
    {
44
        return new ReflectionClass($class);
45
    }
46
47
    public static function getClassMethod($class,$name)
48
    {
49
        $class = self::getClass($class);
50
        $method = $class->getMethod($name);
51
        $method->setAccessible(true);
52
        return $method;
53
    }
54
55
    public static function t($str,$params=array(),$dic='yii-debug-toolbar') {
56
        return Yii::t("YiiDebug.".$dic, $str, $params);
57
    }
58
}
59