Kint_Renderer_Text_DepthLimit   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 15
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 12 12 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3 View Code Duplication
class Kint_Renderer_Text_DepthLimit extends Kint_Renderer_Text_Plugin
0 ignored issues
show
Coding Style introduced by
Kint_Renderer_Text_DepthLimit 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...
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

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
        $out = '';
8
9
        if ($o->depth == 0) {
10
            $out .= $this->renderer->colorTitle($this->renderer->renderTitle($o)).PHP_EOL;
11
        }
12
13
        $out .= $this->renderer->renderHeader($o).' '.$this->renderer->colorValue('DEPTH LIMIT').PHP_EOL;
14
15
        return $out;
16
    }
17
}
18