Completed
Push — master ( 353d0b...cd0f1c )
by Michael
03:14
created

__TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384   F

Complexity

Total Complexity 135

Size/Duplication

Total Lines 702
Duplicated Lines 17.09 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 135
c 0
b 0
f 0
lcom 0
cbo 0
dl 120
loc 702
rs 1.263

18 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
B doDisplay() 0 39 1
B getnamespace_link() 0 29 6
D getclass_link() 3 43 17
D getmethod_link() 37 37 10
D getproperty_link() 37 37 10
F gethint_link() 12 74 16
C getsource_link() 0 31 7
D getmethod_source_link() 5 36 9
D getabbr_class() 0 30 10
F getmethod_parameters_signature() 12 75 13
C getrender_classes() 0 70 7
C getbreadcrumbs() 0 57 10
B getdeprecated() 0 28 6
C getdeprecations() 14 62 9
A getTemplateName() 0 4 1
A isTraitable() 0 4 1
A getDebugInfo() 0 4 1

How to fix   Duplicated Code    Complexity   

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:

Complex Class

 Tip:   Before tackling complexity, make sure that you eliminate any duplication first. This often can reduce the size of classes significantly.

Complex classes like __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384 often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
/* macros.twig */
4
class __TwigTemplate_df89f146ce5e5bd7387841ceb1c6aae4a7eb94285f73e08a32fd417fea95c384 extends Twig_Template
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
Coding Style introduced by
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
5
{
6
    public function __construct(Twig_Environment $env)
7
    {
8
        parent::__construct($env);
9
10
        $this->parent = false;
11
12
        $this->blocks = array(
13
        );
14
    }
15
16
    protected function doDisplay(array $context, array $blocks = array())
17
    {
18
        // line 4
19
        echo "
20
";
21
        // line 14
22
        echo "
23
";
24
        // line 20
25
        echo "
26
";
27
        // line 26
28
        echo "
29
";
30
        // line 42
31
        echo "
32
";
33
        // line 48
34
        echo "
35
";
36
        // line 56
37
        echo "
38
";
39
        // line 60
40
        echo "
41
";
42
        // line 72
43
        echo "
44
";
45
        // line 94
46
        echo "
47
";
48
        // line 106
49
        echo "
50
";
51
        // line 110
52
        echo "
53
";
54
    }
55
56
    // line 1
57
    public function getnamespace_link($__namespace__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
58
    {
59
        $context = $this->env->mergeGlobals(array(
60
            "namespace" => $__namespace__,
61
            "varargs" => $__varargs__,
62
        ));
63
64
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
65
66
        ob_start();
67
        try {
68
            // line 2
69
            echo "<a href=\"";
70
            echo $this->env->getExtension('sami')->pathForNamespace($context, (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace")));
71
            echo "\">";
72
            echo (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace"));
73
            echo "</a>";
74
        } catch (Exception $e) {
0 ignored issues
show
Unused Code introduced by
catch (\Exception $e) { ...lean(); throw $e; } does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
75
            ob_end_clean();
76
77
            throw $e;
78
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
79
            ob_end_clean();
80
81
            throw $e;
82
        }
83
84
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
85
    }
86
87
    // line 5
88
    public function getclass_link($__class__ = null, $__absolute__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
89
    {
90
        $context = $this->env->mergeGlobals(array(
91
            "class" => $__class__,
92
            "absolute" => $__absolute__,
93
            "varargs" => $__varargs__,
94
        ));
95
96
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
97
98
        ob_start();
99
        try {
100
            // line 6
101
            if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "projectclass", array())) {
102
                // line 7
103
                echo "<a href=\"";
104
                echo $this->env->getExtension('sami')->pathForClass($context, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")));
105
                echo "\">";
106
            } elseif ($this->getAttribute(            // line 8
107
(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "phpclass", array())) {
108
                // line 9
109
                echo "<a target=\"_blank\" href=\"http://php.net/";
110
                echo (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"));
111
                echo "\">";
112
            }
113
            // line 11
114
            echo $this->env->getExtension('sami')->abbrClass((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), ((array_key_exists("absolute", $context)) ? (_twig_default_filter((isset($context["absolute"]) ? $context["absolute"] : $this->getContext($context, "absolute")), false)) : (false)));
115
            // line 12
116 View Code Duplication
            if (($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "projectclass", array()) || $this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "phpclass", array()))) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
117
                echo "</a>";
118
            }
119
        } catch (Exception $e) {
120
            ob_end_clean();
121
122
            throw $e;
123
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
124
            ob_end_clean();
125
126
            throw $e;
127
        }
128
129
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
130
    }
131
132
    // line 15
133 View Code Duplication
    public function getmethod_link($__method__ = null, $__absolute__ = null, $__classonly__ = null, ...$__varargs__)
0 ignored issues
show
Duplication introduced by
This method 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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
134
    {
135
        $context = $this->env->mergeGlobals(array(
136
            "method" => $__method__,
137
            "absolute" => $__absolute__,
138
            "classonly" => $__classonly__,
139
            "varargs" => $__varargs__,
140
        ));
141
142
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
143
144
        ob_start();
145
        try {
146
            // line 16
147
            echo "<a href=\"";
148
            echo $this->env->getExtension('sami')->pathForMethod($context, (isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")));
149
            echo "\">";
150
            // line 17
151
            echo $this->env->getExtension('sami')->abbrClass($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "class", array()));
152
            if ( !((array_key_exists("classonly", $context)) ? (_twig_default_filter((isset($context["classonly"]) ? $context["classonly"] : $this->getContext($context, "classonly")), false)) : (false))) {
153
                echo "::";
154
                echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "name", array());
155
            }
156
            // line 18
157
            echo "</a>";
158
        } catch (Exception $e) {
159
            ob_end_clean();
160
161
            throw $e;
162
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
163
            ob_end_clean();
164
165
            throw $e;
166
        }
167
168
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
169
    }
170
171
    // line 21
172 View Code Duplication
    public function getproperty_link($__property__ = null, $__absolute__ = null, $__classonly__ = null, ...$__varargs__)
0 ignored issues
show
Duplication introduced by
This method 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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
173
    {
174
        $context = $this->env->mergeGlobals(array(
175
            "property" => $__property__,
176
            "absolute" => $__absolute__,
177
            "classonly" => $__classonly__,
178
            "varargs" => $__varargs__,
179
        ));
180
181
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
182
183
        ob_start();
184
        try {
185
            // line 22
186
            echo "<a href=\"";
187
            echo $this->env->getExtension('sami')->pathForProperty($context, (isset($context["property"]) ? $context["property"] : $this->getContext($context, "property")));
188
            echo "\">";
189
            // line 23
190
            echo $this->env->getExtension('sami')->abbrClass($this->getAttribute((isset($context["property"]) ? $context["property"] : $this->getContext($context, "property")), "class", array()));
191
            if ( !((array_key_exists("classonly", $context)) ? (_twig_default_filter((isset($context["classonly"]) ? $context["classonly"] : $this->getContext($context, "classonly")), true)) : (true))) {
192
                echo "#";
193
                echo $this->getAttribute((isset($context["property"]) ? $context["property"] : $this->getContext($context, "property")), "name", array());
194
            }
195
            // line 24
196
            echo "</a>";
197
        } catch (Exception $e) {
198
            ob_end_clean();
199
200
            throw $e;
201
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
202
            ob_end_clean();
203
204
            throw $e;
205
        }
206
207
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
208
    }
209
210
    // line 27
211
    public function gethint_link($__hints__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
212
    {
213
        $context = $this->env->mergeGlobals(array(
214
            "hints" => $__hints__,
215
            "varargs" => $__varargs__,
216
        ));
217
218
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
219
220
        ob_start();
221
        try {
222
            // line 28
223
            $context["__internal_aa4457db5f376eaa98f6ab24401bc14cfd42c3bf478e1fca043e6335e8410680"] = $this;
224
            // line 30
225
            if ((isset($context["hints"]) ? $context["hints"] : $this->getContext($context, "hints"))) {
226
                // line 31
227
                $context['_parent'] = $context;
228
                $context['_seq'] = twig_ensure_traversable((isset($context["hints"]) ? $context["hints"] : $this->getContext($context, "hints")));
229
                $context['loop'] = array(
230
                  'parent' => $context['_parent'],
231
                  'index0' => 0,
232
                  'index'  => 1,
233
                  'first'  => true,
234
                );
235 View Code Duplication
                if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
236
                    $length = count($context['_seq']);
237
                    $context['loop']['revindex0'] = $length - 1;
238
                    $context['loop']['revindex'] = $length;
239
                    $context['loop']['length'] = $length;
240
                    $context['loop']['last'] = 1 === $length;
241
                }
242
                foreach ($context['_seq'] as $context["_key"] => $context["hint"]) {
0 ignored issues
show
Bug introduced by
The expression $context['_seq'] of type array|object<Countable> is not guaranteed to be traversable. How about adding an additional type check?

There are different options of fixing this problem.

  1. If you want to be on the safe side, you can add an additional type-check:

    $collection = json_decode($data, true);
    if ( ! is_array($collection)) {
        throw new \RuntimeException('$collection must be an array.');
    }
    
    foreach ($collection as $item) { /** ... */ }
    
  2. If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:

    /** @var array $collection */
    $collection = json_decode($data, true);
    
    foreach ($collection as $item) { /** .. */ }
    
  3. Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.

Loading history...
243
                    // line 32
244
                    if ($this->getAttribute($context["hint"], "class", array())) {
245
                        // line 33
246
                        echo $context["__internal_aa4457db5f376eaa98f6ab24401bc14cfd42c3bf478e1fca043e6335e8410680"]->getclass_link($this->getAttribute($context["hint"], "name", array()));
247
                    } elseif ($this->getAttribute(                    // line 34
248
$context["hint"], "name", array())) {
249
                        // line 35
250
                        echo $this->env->getExtension('sami')->abbrClass($this->getAttribute($context["hint"], "name", array()));
251
                    }
252
                    // line 37
253
                    if ($this->getAttribute($context["hint"], "array", array())) {
254
                        echo "[]";
255
                    }
256
                    // line 38
257
                    if ( !$this->getAttribute($context["loop"], "last", array())) {
258
                        echo "|";
259
                    }
260
                    ++$context['loop']['index0'];
261
                    ++$context['loop']['index'];
262
                    $context['loop']['first'] = false;
263 View Code Duplication
                    if (isset($context['loop']['length'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
264
                        --$context['loop']['revindex0'];
265
                        --$context['loop']['revindex'];
266
                        $context['loop']['last'] = 0 === $context['loop']['revindex0'];
267
                    }
268
                }
269
                $_parent = $context['_parent'];
270
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['hint'], $context['_parent'], $context['loop']);
271
                $context = array_intersect_key($context, $_parent) + $_parent;
0 ignored issues
show
Unused Code introduced by
$context is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
272
            }
273
        } catch (Exception $e) {
274
            ob_end_clean();
275
276
            throw $e;
277
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
278
            ob_end_clean();
279
280
            throw $e;
281
        }
282
283
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
284
    }
285
286
    // line 43
287
    public function getsource_link($__project__ = null, $__class__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
288
    {
289
        $context = $this->env->mergeGlobals(array(
290
            "project" => $__project__,
291
            "class" => $__class__,
292
            "varargs" => $__varargs__,
293
        ));
294
295
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
296
297
        ob_start();
298
        try {
299
            // line 44
300
            if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "sourcepath", array())) {
301
                // line 45
302
                echo "        (<a href=\"";
303
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "sourcepath", array()), "html", null, true);
304
                echo "\">View source</a>)";
305
            }
306
        } catch (Exception $e) {
307
            ob_end_clean();
308
309
            throw $e;
310
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
311
            ob_end_clean();
312
313
            throw $e;
314
        }
315
316
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
317
    }
318
319
    // line 49
320
    public function getmethod_source_link($__method__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
321
    {
322
        $context = $this->env->mergeGlobals(array(
323
            "method" => $__method__,
324
            "varargs" => $__varargs__,
325
        ));
326
327
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
328
329
        ob_start();
330
        try {
331
            // line 50
332
            if ($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "sourcepath", array())) {
333
                // line 51
334
                echo "        <a href=\"";
335
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "sourcepath", array()), "html", null, true);
336
                echo "\">line ";
337
                echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "line", array());
338
                echo "</a>";
339 View Code Duplication
            } else {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
340
                // line 53
341
                echo "        line ";
342
                echo $this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "line", array());
343
            }
344
        } catch (Exception $e) {
345
            ob_end_clean();
346
347
            throw $e;
348
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
349
            ob_end_clean();
350
351
            throw $e;
352
        }
353
354
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
355
    }
356
357
    // line 57
358
    public function getabbr_class($__class__ = null, $__absolute__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
359
    {
360
        $context = $this->env->mergeGlobals(array(
361
            "class" => $__class__,
362
            "absolute" => $__absolute__,
363
            "varargs" => $__varargs__,
364
        ));
365
366
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
367
368
        ob_start();
369
        try {
370
            // line 58
371
            echo "<abbr title=\"";
372
            echo twig_escape_filter($this->env, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "html", null, true);
373
            echo "\">";
374
            echo twig_escape_filter($this->env, ((((array_key_exists("absolute", $context)) ? (_twig_default_filter((isset($context["absolute"]) ? $context["absolute"] : $this->getContext($context, "absolute")), false)) : (false))) ? ((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"))) : ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "shortname", array()))), "html", null, true);
375
            echo "</abbr>";
376
        } catch (Exception $e) {
0 ignored issues
show
Unused Code introduced by
catch (\Exception $e) { ...lean(); throw $e; } does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
377
            ob_end_clean();
378
379
            throw $e;
380
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
381
            ob_end_clean();
382
383
            throw $e;
384
        }
385
386
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
387
    }
388
389
    // line 61
390
    public function getmethod_parameters_signature($__method__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
391
    {
392
        $context = $this->env->mergeGlobals(array(
393
            "method" => $__method__,
394
            "varargs" => $__varargs__,
395
        ));
396
397
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
398
399
        ob_start();
400
        try {
401
            // line 62
402
            $context["__internal_83cc147ed1eef284176f45c0b5356f56536328767f55591e9f2c2c2ba44520f2"] = $this->loadTemplate("macros.twig", "macros.twig", 62);
403
            // line 63
404
            echo "(";
405
            // line 64
406
            $context['_parent'] = $context;
407
            $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["method"]) ? $context["method"] : $this->getContext($context, "method")), "parameters", array()));
408
            $context['loop'] = array(
409
              'parent' => $context['_parent'],
410
              'index0' => 0,
411
              'index'  => 1,
412
              'first'  => true,
413
            );
414 View Code Duplication
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
415
                $length = count($context['_seq']);
416
                $context['loop']['revindex0'] = $length - 1;
417
                $context['loop']['revindex'] = $length;
418
                $context['loop']['length'] = $length;
419
                $context['loop']['last'] = 1 === $length;
420
            }
421
            foreach ($context['_seq'] as $context["_key"] => $context["parameter"]) {
0 ignored issues
show
Bug introduced by
The expression $context['_seq'] of type array|object<Countable> is not guaranteed to be traversable. How about adding an additional type check?

There are different options of fixing this problem.

  1. If you want to be on the safe side, you can add an additional type-check:

    $collection = json_decode($data, true);
    if ( ! is_array($collection)) {
        throw new \RuntimeException('$collection must be an array.');
    }
    
    foreach ($collection as $item) { /** ... */ }
    
  2. If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:

    /** @var array $collection */
    $collection = json_decode($data, true);
    
    foreach ($collection as $item) { /** .. */ }
    
  3. Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.

Loading history...
422
                // line 65
423
                if ($this->getAttribute($context["parameter"], "hashint", array())) {
424
                    echo $context["__internal_83cc147ed1eef284176f45c0b5356f56536328767f55591e9f2c2c2ba44520f2"]->gethint_link($this->getAttribute($context["parameter"], "hint", array()));
425
                    echo " ";
426
                }
427
                // line 66
428
                echo "\$";
429
                echo $this->getAttribute($context["parameter"], "name", array());
430
                // line 67
431
                if ($this->getAttribute($context["parameter"], "default", array())) {
432
                    echo " = ";
433
                    echo twig_escape_filter($this->env, $this->getAttribute($context["parameter"], "default", array()), "html", null, true);
434
                }
435
                // line 68
436
                if ( !$this->getAttribute($context["loop"], "last", array())) {
437
                    echo ", ";
438
                }
439
                ++$context['loop']['index0'];
440
                ++$context['loop']['index'];
441
                $context['loop']['first'] = false;
442 View Code Duplication
                if (isset($context['loop']['length'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
443
                    --$context['loop']['revindex0'];
444
                    --$context['loop']['revindex'];
445
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
446
                }
447
            }
448
            $_parent = $context['_parent'];
449
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['parameter'], $context['_parent'], $context['loop']);
450
            $context = array_intersect_key($context, $_parent) + $_parent;
0 ignored issues
show
Unused Code introduced by
$context is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
451
            // line 70
452
            echo ")";
453
        } catch (Exception $e) {
454
            ob_end_clean();
455
456
            throw $e;
457
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
458
            ob_end_clean();
459
460
            throw $e;
461
        }
462
463
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
464
    }
465
466
    // line 73
467
    public function getrender_classes($__classes__ = null, ...$__varargs__)
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
468
    {
469
        $context = $this->env->mergeGlobals(array(
470
            "classes" => $__classes__,
471
            "varargs" => $__varargs__,
472
        ));
473
474
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
475
476
        ob_start();
477
        try {
478
            // line 74
479
            $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"] = $this;
480
            // line 75
481
            echo "
482
    <div class=\"container-fluid underlined\">
483
        ";
484
            // line 77
485
            $context['_parent'] = $context;
486
            $context['_seq'] = twig_ensure_traversable((isset($context["classes"]) ? $context["classes"] : $this->getContext($context, "classes")));
487
            foreach ($context['_seq'] as $context["_key"] => $context["class"]) {
488
                // line 78
489
                echo "            <div class=\"row\">
490
                <div class=\"col-md-6\">
491
                    ";
492
                // line 80
493
                if ($this->getAttribute($context["class"], "isInterface", array())) {
494
                    // line 81
495
                    echo "                        <em>";
496
                    echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getclass_link($context["class"], true);
497
                    echo "</em>
498
                    ";
499
                } else {
500
                    // line 83
501
                    echo "                        ";
502
                    echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getclass_link($context["class"], true);
503
                    echo "
504
                    ";
505
                }
506
                // line 85
507
                echo "                    ";
508
                echo $context["__internal_105fd4738f4323d4064943fc09ee4778bf76f7e03ae2d7650dfffaaab0be5088"]->getdeprecated($context["class"]);
509
                echo "
510
                </div>
511
                <div class=\"col-md-6\">
512
                    ";
513
                // line 88
514
                echo $this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"]);
515
                echo "
516
                </div>
517
            </div>
518
        ";
519
            }
520
            $_parent = $context['_parent'];
521
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']);
522
            $context = array_intersect_key($context, $_parent) + $_parent;
0 ignored issues
show
Unused Code introduced by
$context is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
523
            // line 92
524
            echo "    </div>";
525
        } catch (Exception $e) {
526
            ob_end_clean();
527
528
            throw $e;
529
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
530
            ob_end_clean();
531
532
            throw $e;
533
        }
534
535
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
536
    }
537
538
    // line 95
539
    public function getbreadcrumbs($__namespace__ = null, ...$__varargs__)
540
    {
541
        $context = $this->env->mergeGlobals(array(
542
            "namespace" => $__namespace__,
543
            "varargs" => $__varargs__,
544
        ));
545
546
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
547
548
        ob_start();
549
        try {
550
            // line 96
551
            echo "    ";
552
            $context["current_ns"] = "";
553
            // line 97
554
            echo "    ";
555
            $context['_parent'] = $context;
556
            $context['_seq'] = twig_ensure_traversable(twig_split_filter($this->env, (isset($context["namespace"]) ? $context["namespace"] : $this->getContext($context, "namespace")), "\\"));
557
            foreach ($context['_seq'] as $context["_key"] => $context["ns"]) {
558
                // line 98
559
                echo "        ";
560
                if ((isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns"))) {
561
                    // line 99
562
                    echo "            ";
563
                    $context["current_ns"] = (((isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns")) . "\\") . $context["ns"]);
564
                    // line 100
565
                    echo "        ";
566
                } else {
567
                    // line 101
568
                    echo "            ";
569
                    $context["current_ns"] = $context["ns"];
570
                    // line 102
571
                    echo "        ";
572
                }
573
                // line 103
574
                echo "        <li><a href=\"";
575
                echo $this->env->getExtension('sami')->pathForNamespace($context, (isset($context["current_ns"]) ? $context["current_ns"] : $this->getContext($context, "current_ns")));
576
                echo "\">";
577
                echo $context["ns"];
578
                echo "</a></li>
579
    ";
580
            }
581
            $_parent = $context['_parent'];
582
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ns'], $context['_parent'], $context['loop']);
583
            $context = array_intersect_key($context, $_parent) + $_parent;
0 ignored issues
show
Unused Code introduced by
$context is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
584
        } catch (Exception $e) {
585
            ob_end_clean();
586
587
            throw $e;
588
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
589
            ob_end_clean();
590
591
            throw $e;
592
        }
593
594
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
595
    }
596
597
    // line 107
598
    public function getdeprecated($__reflection__ = null, ...$__varargs__)
599
    {
600
        $context = $this->env->mergeGlobals(array(
601
            "reflection" => $__reflection__,
602
            "varargs" => $__varargs__,
603
        ));
604
605
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
606
607
        ob_start();
608
        try {
609
            // line 108
610
            echo "    ";
611
            if ($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array())) {
612
                echo "<small><sup><span class=\"label label-danger\">deprecated</span></sup></small>";
613
            }
614
        } catch (Exception $e) {
615
            ob_end_clean();
616
617
            throw $e;
618
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
619
            ob_end_clean();
620
621
            throw $e;
622
        }
623
624
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
625
    }
626
627
    // line 111
628
    public function getdeprecations($__reflection__ = null, ...$__varargs__)
629
    {
630
        $context = $this->env->mergeGlobals(array(
631
            "reflection" => $__reflection__,
632
            "varargs" => $__varargs__,
633
        ));
634
635
        $blocks = array();
0 ignored issues
show
Unused Code introduced by
$blocks is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
636
637
        ob_start();
638
        try {
639
            // line 112
640
            echo "    ";
641
            $context["__internal_f59e0fc423de9b92b8dc90cb9a08c0bea426dd301f085d2553c0a8a9b5a1dfbe"] = $this;
642
            // line 113
643
            echo "
644
    ";
645
            // line 114
646
            if ($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array())) {
647
                // line 115
648
                echo "        <p>
649
            ";
650
                // line 116
651
                echo $context["__internal_f59e0fc423de9b92b8dc90cb9a08c0bea426dd301f085d2553c0a8a9b5a1dfbe"]->getdeprecated((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")));
652
                echo "
653
            ";
654
                // line 117
655
                $context['_parent'] = $context;
656
                $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["reflection"]) ? $context["reflection"] : $this->getContext($context, "reflection")), "deprecated", array()));
657 View Code Duplication
                foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across 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...
658
                    // line 118
659
                    echo "                <tr>
660
                    <td>";
661
                    // line 119
662
                    echo $this->getAttribute($context["tag"], 0, array(), "array");
663
                    echo "</td>
664
                    <td>";
665
                    // line 120
666
                    echo twig_join_filter(twig_slice($this->env, $context["tag"], 1, null), " ");
667
                    echo "</td>
668
                </tr>
669
            ";
670
                }
671
                $_parent = $context['_parent'];
672
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
673
                $context = array_intersect_key($context, $_parent) + $_parent;
0 ignored issues
show
Unused Code introduced by
$context is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
674
                // line 123
675
                echo "        </p>
676
    ";
677
            }
678
        } catch (Exception $e) {
679
            ob_end_clean();
680
681
            throw $e;
682
        } catch (Throwable $e) {
0 ignored issues
show
Bug introduced by
The class Throwable does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
683
            ob_end_clean();
684
685
            throw $e;
686
        }
687
688
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
689
    }
690
691
    public function getTemplateName()
692
    {
693
        return "macros.twig";
694
    }
695
696
    public function isTraitable()
697
    {
698
        return false;
699
    }
700
701
    public function getDebugInfo()
702
    {
703
        return array (  675 => 123,  666 => 120,  662 => 119,  659 => 118,  655 => 117,  651 => 116,  648 => 115,  646 => 114,  643 => 113,  640 => 112,  628 => 111,  610 => 108,  598 => 107,  574 => 103,  571 => 102,  568 => 101,  565 => 100,  562 => 99,  559 => 98,  554 => 97,  551 => 96,  539 => 95,  524 => 92,  514 => 88,  507 => 85,  501 => 83,  495 => 81,  493 => 80,  489 => 78,  485 => 77,  481 => 75,  479 => 74,  467 => 73,  452 => 70,  436 => 68,  431 => 67,  428 => 66,  423 => 65,  406 => 64,  404 => 63,  402 => 62,  390 => 61,  371 => 58,  358 => 57,  341 => 53,  334 => 51,  332 => 50,  320 => 49,  302 => 45,  300 => 44,  287 => 43,  257 => 38,  253 => 37,  250 => 35,  248 => 34,  246 => 33,  244 => 32,  227 => 31,  225 => 30,  223 => 28,  211 => 27,  196 => 24,  190 => 23,  186 => 22,  172 => 21,  157 => 18,  151 => 17,  147 => 16,  133 => 15,  116 => 12,  114 => 11,  109 => 9,  107 => 8,  103 => 7,  101 => 6,  88 => 5,  69 => 2,  57 => 1,  52 => 110,  49 => 106,  46 => 94,  43 => 72,  40 => 60,  37 => 56,  34 => 48,  31 => 42,  28 => 26,  25 => 20,  22 => 14,  19 => 4,);
704
    }
705
}
706
/* {% macro namespace_link(namespace) -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
707
/*     <a href="{{ namespace_path(namespace) }}">{{ namespace|raw }}</a>*/
708
/* {%- endmacro %}*/
709
/* */
710
/* {% macro class_link(class, absolute) -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
711
/*     {%- if class.projectclass -%}*/
712
/*         <a href="{{ class_path(class) }}">*/
713
/*     {%- elseif class.phpclass -%}*/
714
/*         <a target="_blank" href="http://php.net/{{ class|raw }}">*/
715
/*     {%- endif %}*/
716
/*     {{- abbr_class(class, absolute|default(false)) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
717
/*     {%- if class.projectclass or class.phpclass %}</a>{% endif %}*/
718
/* {%- endmacro %}*/
719
/* */
720
/* {% macro method_link(method, absolute, classonly) -%}*/
721
/*     <a href="{{ method_path(method) }}">*/
722
/*         {{- abbr_class(method.class) }}{% if not classonly|default(false) %}::{{ method.name|raw }}{% endif -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
46% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
723
/*     </a>*/
724
/* {%- endmacro %}*/
725
/* */
726
/* {% macro property_link(property, absolute, classonly) -%}*/
727
/*     <a href="{{ property_path(property) }}">*/
728
/*         {{- abbr_class(property.class) }}{% if not classonly|default(true) %}#{{ property.name|raw }}{% endif -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
729
/*     </a>*/
730
/* {%- endmacro %}*/
731
/* */
732
/* {% macro hint_link(hints) -%}*/
733
/*     {%- from _self import class_link %}*/
734
/* */
735
/*     {%- if hints %}*/
736
/*         {%- for hint in hints %}*/
737
/*             {%- if hint.class %}*/
738
/*                 {{- class_link(hint.name) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
739
/*             {%- elseif hint.name %}*/
740
/*                 {{- abbr_class(hint.name) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
741
/*             {%- endif %}*/
742
/*             {%- if hint.array %}[]{% endif %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
41% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
743
/*             {%- if not loop.last %}|{% endif %}*/
744
/*         {%- endfor %}*/
745
/*     {%- endif %}*/
746
/* {%- endmacro %}*/
747
/* */
748
/* {% macro source_link(project, class) -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
749
/*     {% if class.sourcepath %}*/
750
/*         (<a href="{{ class.sourcepath }}">View source</a>)*/
751
/*     {%- endif %}*/
752
/* {%- endmacro %}*/
753
/* */
754
/* {% macro method_source_link(method) -%}*/
755
/*     {% if method.sourcepath %}*/
756
/*         <a href="{{ method.sourcepath }}">line {{ method.line|raw }}</a>*/
757
/*     {%- else %}*/
758
/*         line {{ method.line|raw }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
759
/*     {%- endif %}*/
760
/* {%- endmacro %}*/
761
/* */
762
/* {% macro abbr_class(class, absolute) -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
763
/*     <abbr title="{{ class }}">{{ absolute|default(false) ? class : class.shortname }}</abbr>*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
764
/* {%- endmacro %}*/
765
/* */
766
/* {% macro method_parameters_signature(method) -%}*/
767
/*     {%- from "macros.twig" import hint_link -%}*/
768
/*     (*/
769
/*         {%- for parameter in method.parameters %}*/
770
/*             {%- if parameter.hashint %}{{ hint_link(parameter.hint) }} {% endif -%}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
771
/*             ${{ parameter.name|raw }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
772
/*             {%- if parameter.default %} = {{ parameter.default }}{% endif %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
773
/*             {%- if not loop.last %}, {% endif %}*/
774
/*         {%- endfor -%}*/
775
/*     )*/
776
/* {%- endmacro %}*/
777
/* */
778
/* {% macro render_classes(classes) -%}*/
779
/*     {% from _self import class_link, deprecated %}*/
780
/* */
781
/*     <div class="container-fluid underlined">*/
782
/*         {% for class in classes %}*/
783
/*             <div class="row">*/
784
/*                 <div class="col-md-6">*/
785
/*                     {% if class.isInterface %}*/
786
/*                         <em>{{ class_link(class, true) }}</em>*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
787
/*                     {% else %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
788
/*                         {{ class_link(class, true) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
789
/*                     {% endif %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
790
/*                     {{ deprecated(class) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
791
/*                 </div>*/
792
/*                 <div class="col-md-6">*/
793
/*                     {{ class.shortdesc|desc(class) }}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
794
/*                 </div>*/
795
/*             </div>*/
796
/*         {% endfor %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
797
/*     </div>*/
798
/* {%- endmacro %}*/
799
/* */
800
/* {% macro breadcrumbs(namespace) %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
39% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
801
/*     {% set current_ns = '' %}*/
802
/*     {% for ns in namespace|split('\\') %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
803
/*         {% if current_ns %}*/
804
/*             {% set current_ns = current_ns ~ '\\' ~ ns %}*/
805
/*         {% else %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
806
/*             {% set current_ns = ns %}*/
807
/*         {% endif %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
808
/*         <li><a href="{{ namespace_path(current_ns) }}">{{ ns|raw }}</a></li>*/
809
/*     {% endfor %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
810
/* {% endmacro %}*/
811
/* */
812
/* {% macro deprecated(reflection) %}*/
813
/*     {% if reflection.deprecated %}<small><sup><span class="label label-danger">deprecated</span></sup></small>{% endif %}*/
814
/* {% endmacro %}*/
815
/* */
816
/* {% macro deprecations(reflection) %}*/
817
/*     {% from _self import deprecated %}*/
818
/* */
819
/*     {% if reflection.deprecated %}*/
820
/*         <p>*/
821
/*             {{ deprecated(reflection )}}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
55% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
822
/*             {% for tag in reflection.deprecated %}*/
823
/*                 <tr>*/
824
/*                     <td>{{ tag[0]|raw }}</td>*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
40% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
825
/*                     <td>{{ tag[1:]|join(' ')|raw }}</td>*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
826
/*                 </tr>*/
827
/*             {% endfor %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
828
/*         </p>*/
829
/*     {% endif %}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
830
/* {% endmacro %}*/
831
/* */
832