| Conditions | 6 |
| Paths | 6 |
| Total Lines | 30 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function parse(&$var, Kint_Object &$o, $trigger) |
||
| 16 | { |
||
| 17 | if (!$o instanceof Kint_Object_Resource || $o->resource_type !== 'stream') { |
||
| 18 | return; |
||
| 19 | } |
||
| 20 | |||
| 21 | if (!$meta = stream_get_meta_data($var)) { |
||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | $rep = new Kint_Object_Representation('Stream'); |
||
| 26 | $rep->implicit_label = true; |
||
| 27 | |||
| 28 | $base_obj = new Kint_Object(); |
||
| 29 | $base_obj->depth = $o->depth; |
||
| 30 | |||
| 31 | if ($o->access_path) { |
||
| 32 | $base_obj->access_path = 'stream_get_meta_data('.$o->access_path.')'; |
||
| 33 | } |
||
| 34 | |||
| 35 | $rep->contents = $this->parser->parse($meta, $base_obj); |
||
| 36 | |||
| 37 | if (!in_array('depth_limit', $rep->contents->hints)) { |
||
| 38 | $rep->contents = $rep->contents->value->contents; |
||
| 39 | } |
||
| 40 | |||
| 41 | $o->addRepresentation($rep, 0); |
||
| 42 | |||
| 43 | $o = $o->transplant(new Kint_Object_Stream($meta)); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
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.