Kint_Renderer_Rich_Closure   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
B render() 0 25 4
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