Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 18 |
Lines | 8 |
Ratio | 32 % |
Changes | 0 |
1 | <?php |
||
48 | protected function blacklist(&$var, &$o) |
||
49 | { |
||
50 | View Code Duplication | if (function_exists('spl_object_hash')) { |
|
51 | $hash = spl_object_hash($var); |
||
52 | } else { |
||
53 | ob_start(); |
||
54 | var_dump($var); |
||
55 | preg_match('/#(\d+)/', ob_get_clean(), $match); |
||
56 | $hash = $match[1]; |
||
57 | } |
||
58 | |||
59 | $object = $o->transplant(new Kint_Object_Instance()); |
||
60 | $object->classname = get_class($var); |
||
61 | $object->hash = $hash; |
||
62 | $object->clearRepresentations(); |
||
63 | $object->value = null; |
||
64 | $object->size = null; |
||
65 | $object->hints[] = 'blacklist'; |
||
66 | |||
67 | $o = $object; |
||
68 | |||
69 | $this->parser->haltParse(); |
||
70 | |||
71 | return; |
||
72 | } |
||
73 | } |
||
74 |
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.