Kint_Renderer_Rich_Closure::render()   B
last analyzed

Complexity

Conditions 4
Paths 5

Size

Total Lines 25
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 14
nc 5
nop 1
dl 0
loc 25
rs 8.5806
c 0
b 0
f 0
1
<?php
2
3
class Kint_Renderer_Rich_Closure extends Kint_Renderer_Rich_Plugin
0 ignored issues
show
Coding Style introduced by
Kint_Renderer_Rich_Closure does not seem to conform to the naming convention (^[A-Z][a-zA-Z0-9]*$).

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.

Loading history...
4
{
5
    public function render($o)
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...
6
    {
7
        $children = $this->renderer->renderChildren($o);
8
9
        if (!($o instanceof Kint_Object_Closure)) {
10
            $header = $this->renderer->renderHeader($o);
11
        } else {
12
            $header = '';
13
14
            if (($s = $o->getModifiers()) !== null) {
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $s. 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...
15
                $header .= '<var>'.$s.'</var> ';
16
            }
17
18
            if (($s = $o->getName()) !== null) {
19
                $header .= '<dfn>'.$this->renderer->escape($s).'('.$this->renderer->escape($o->getParams()).')</dfn> ';
20
            }
21
22
            $header .= '<var>Closure</var> ';
23
            $header .= $this->renderer->escape(Kint::shortenPath($o->filename)).':'.(int) $o->startline;
24
        }
25
26
        $header = $this->renderer->renderHeaderWrapper($o, (bool) strlen($children), $header);
27
28
        return '<dl>'.$header.$children.'</dl>';
29
    }
30
}
31