ProxyPlugin::getTypes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
class ProxyPlugin extends Kint_Parser_Plugin
4
{
5
    protected $types;
6
    protected $triggers;
7
    protected $callback;
8
9
    public function __construct($types, $triggers, $callback)
10
    {
11
        $this->types = $types;
12
        $this->triggers = $triggers;
13
        $this->callback = $callback;
14
    }
15
16
    public function getTypes()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
17
    {
18
        return $this->types;
19
    }
20
21
    public function getTriggers()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
22
    {
23
        return $this->triggers;
24
    }
25
26
    public function parse(&$var, Kint_Object &$o, $trigger)
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $o. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
27
    {
28
        return call_user_func_array($this->callback, array(&$var, &$o, $trigger, $this->parser));
29
    }
30
}
31