Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function parse(&$var, Kint_Object &$o, $trigger) |
||
20 | { |
||
21 | $reflection = new ReflectionClass($var); |
||
22 | if (!$reflection->hasMethod('__toString')) { |
||
23 | return; |
||
24 | } |
||
25 | |||
26 | foreach (self::$blacklist as $class) { |
||
27 | if ($var instanceof $class) { |
||
28 | return; |
||
29 | } |
||
30 | } |
||
31 | |||
32 | $r = new Kint_Object_Representation('toString'); |
||
33 | $r->contents = (string) $var; |
||
34 | |||
35 | $o->addRepresentation($r); |
||
36 | } |
||
37 | } |
||
38 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.