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

block_search_index()   D

Complexity

Conditions 10
Paths 30

Size

Total Lines 103
Code Lines 72

Duplication

Lines 14
Ratio 13.59 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 14
loc 103
rs 4.8196
cc 10
eloc 72
nc 30
nop 2

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/* sami.js.twig */
4
class __TwigTemplate_1af9ac9d8e6bdab055b91c0b315695ba76def72622bbd698fddd8fae39f228e2 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
            'search_index' => array($this, 'block_search_index'),
14
            'search_index_extra' => array($this, 'block_search_index_extra'),
15
            'treejs' => array($this, 'block_treejs'),
16
        );
17
    }
18
19
    protected function doDisplay(array $context, array $blocks = array())
20
    {
21
        // line 1
22
        $context["__internal_3abfe7d95b8e3dc37a5cb5534978c7915201cd06e8e3449801da4b7670b2eea7"] = $this;
23
        // line 2
24
        echo "
25
(function(root) {
26
27
    var bhIndex = null;
28
    var rootPath = '';
29
    var treeHtml = '";
30
        // line 7
31
        echo twig_replace_filter($context["__internal_3abfe7d95b8e3dc37a5cb5534978c7915201cd06e8e3449801da4b7670b2eea7"]->getelement((isset($context["tree"]) ? $context["tree"] : $this->getContext($context, "tree")), $this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "default_opened_level"), "method"), 0), array("'" => "\\'", "
32
" => ""));
33
        echo "';
34
35
    var searchTypeClasses = {
36
        'Namespace': 'label-default',
37
        'Class': 'label-info',
38
        'Interface': 'label-primary',
39
        'Trait': 'label-success',
40
        'Method': 'label-danger',
41
        '_': 'label-warning'
42
    };
43
44
    var searchIndex = [
45
        ";
46
        // line 19
47
        $this->displayBlock('search_index', $context, $blocks);
48
        // line 39
49
        echo "        // Fix trailing commas in the index
50
        {}
51
    ];
52
53
    /** Tokenizes strings by namespaces and functions */
54
    function tokenizer(term) {
55
        if (!term) {
56
            return [];
57
        }
58
59
        var tokens = [term];
60
        var meth = term.indexOf('::');
61
62
        // Split tokens into methods if \"::\" is found.
63
        if (meth > -1) {
64
            tokens.push(term.substr(meth + 2));
65
            term = term.substr(0, meth - 2);
66
        }
67
68
        // Split by namespace or fake namespace.
69
        if (term.indexOf('\\\\') > -1) {
70
            tokens = tokens.concat(term.split('\\\\'));
71
        } else if (term.indexOf('_') > 0) {
72
            tokens = tokens.concat(term.split('_'));
73
        }
74
75
        // Merge in splitting the string by case and return
76
        tokens = tokens.concat(term.match(/(([A-Z]?[^A-Z]*)|([a-z]?[^a-z]*))/g).slice(0,-1));
77
78
        return tokens;
79
    };
80
81
    root.Sami = {
82
        /**
83
         * Cleans the provided term. If no term is provided, then one is
84
         * grabbed from the query string \"search\" parameter.
85
         */
86
        cleanSearchTerm: function(term) {
87
            // Grab from the query string
88
            if (typeof term === 'undefined') {
89
                var name = 'search';
90
                var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");
91
                var results = regex.exec(location.search);
92
                if (results === null) {
93
                    return null;
94
                }
95
                term = decodeURIComponent(results[1].replace(/\\+/g, \" \"));
96
            }
97
98
            return term.replace(/<(?:.|\\n)*?>/gm, '');
99
        },
100
101
        /** Searches through the index for a given term */
102
        search: function(term) {
103
            // Create a new search index if needed
104
            if (!bhIndex) {
105
                bhIndex = new Bloodhound({
106
                    limit: 500,
107
                    local: searchIndex,
108
                    datumTokenizer: function (d) {
109
                        return tokenizer(d.name);
110
                    },
111
                    queryTokenizer: Bloodhound.tokenizers.whitespace
112
                });
113
                bhIndex.initialize();
114
            }
115
116
            results = [];
117
            bhIndex.get(term, function(matches) {
118
                results = matches;
119
            });
120
121
            if (!rootPath) {
122
                return results;
123
            }
124
125
            // Fix the element links based on the current page depth.
126
            return \$.map(results, function(ele) {
127
                if (ele.link.indexOf('..') > -1) {
128
                    return ele;
129
                }
130
                ele.link = rootPath + ele.link;
131
                if (ele.fromLink) {
132
                    ele.fromLink = rootPath + ele.fromLink;
133
                }
134
                return ele;
135
            });
136
        },
137
138
        /** Get a search class for a specific type */
139
        getSearchClass: function(type) {
140
            return searchTypeClasses[type] || searchTypeClasses['_'];
141
        },
142
143
        /** Add the left-nav tree to the site */
144
        injectApiTree: function(ele) {
145
            ele.html(treeHtml);
146
        }
147
    };
148
149
    \$(function() {
150
        // Modify the HTML to work correctly based on the current depth
151
        rootPath = \$('body').attr('data-root-path');
152
        treeHtml = treeHtml.replace(/href=\"/g, 'href=\"' + rootPath);
153
        Sami.injectApiTree(\$('#api-tree'));
154
    });
155
156
    return root.Sami;
157
})(window);
158
159
\$(function() {
160
161
    // Enable the version switcher
162
    \$('#version-switcher').change(function() {
163
        window.location = \$(this).val()
164
    });
165
166
    ";
167
        // line 156
168
        $this->displayBlock('treejs', $context, $blocks);
169
        // line 182
170
        echo "
171
    ";
172
        // line 210
173
        echo "
174
        var form = \$('#search-form .typeahead');
175
        form.typeahead({
176
            hint: true,
177
            highlight: true,
178
            minLength: 1
179
        }, {
180
            name: 'search',
181
            displayKey: 'name',
182
            source: function (q, cb) {
183
                cb(Sami.search(q));
184
            }
185
        });
186
187
        // The selection is direct-linked when the user selects a suggestion.
188
        form.on('typeahead:selected', function(e, suggestion) {
189
            window.location = suggestion.link;
190
        });
191
192
        // The form is submitted when the user hits enter.
193
        form.keypress(function (e) {
194
            if (e.which == 13) {
195
                \$('#search-form').submit();
196
                return true;
197
            }
198
        });
199
200
    ";
201
        echo "
202
});
203
204
";
205
        // line 222
206
        echo "
207
";
208
    }
209
210
    // line 19
211
    public function block_search_index($context, array $blocks = array())
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
        // line 20
214
        echo "            ";
215
        $context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"] = $this;
216
        // line 21
217
        echo "
218
            ";
219
        // line 22
220
        $context['_parent'] = $context;
221
        $context['_seq'] = twig_ensure_traversable((isset($context["namespaces"]) ? $context["namespaces"] : $this->getContext($context, "namespaces")));
222
        foreach ($context['_seq'] as $context["_key"] => $context["ns"]) {
223
            // line 23
224
            echo "{\"type\": \"Namespace\", \"link\": \"";
225
            echo $this->env->getExtension('sami')->pathForNamespace($context, $context["ns"]);
226
            echo "\", \"name\": \"";
227
            echo twig_replace_filter($context["ns"], array("\\" => "\\\\"));
228
            echo "\", \"doc\": \"Namespace ";
229
            echo twig_replace_filter($context["ns"], array("\\" => "\\\\"));
230
            echo "\"},";
231
        }
232
        $_parent = $context['_parent'];
233
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ns'], $context['_parent'], $context['loop']);
234
        $context = array_intersect_key($context, $_parent) + $_parent;
235
        // line 25
236
        echo "
237
            ";
238
        // line 26
239
        $context['_parent'] = $context;
240
        $context['_seq'] = twig_ensure_traversable((isset($context["interfaces"]) ? $context["interfaces"] : $this->getContext($context, "interfaces")));
241
        foreach ($context['_seq'] as $context["_key"] => $context["class"]) {
242
            // line 27
243
            echo "{\"type\": \"Interface\", ";
244 View Code Duplication
            if ($this->getAttribute($context["class"], "namespace", 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...
245
                echo "\"fromName\": \"";
246
                echo twig_replace_filter($this->getAttribute($context["class"], "namespace", array()), array("\\" => "\\\\"));
247
                echo "\", \"fromLink\": \"";
248
                echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["class"], "namespace", array()));
249
                echo "\",";
250
            }
251
            echo " \"link\": \"";
252
            echo $this->env->getExtension('sami')->pathForClass($context, $context["class"]);
253
            echo "\", \"name\": \"";
254
            echo twig_replace_filter($this->getAttribute($context["class"], "name", array()), array("\\" => "\\\\"));
255
            echo "\", \"doc\": \"";
256
            echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"])), "html", null, true);
257
            echo "\"},
258
                ";
259
            // line 28
260
            echo $context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"]->getadd_class_methods_index($context["class"]);
261
            echo "
262
            ";
263
        }
264
        $_parent = $context['_parent'];
265
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']);
266
        $context = array_intersect_key($context, $_parent) + $_parent;
267
        // line 30
268
        echo "
269
            ";
270
        // line 31
271
        $context['_parent'] = $context;
272
        $context['_seq'] = twig_ensure_traversable((isset($context["classes"]) ? $context["classes"] : $this->getContext($context, "classes")));
273
        foreach ($context['_seq'] as $context["_key"] => $context["class"]) {
274
            // line 32
275
            echo "{\"type\": ";
276
            if ($this->getAttribute($context["class"], "isTrait", array())) {
277
                echo "\"Trait\"";
278
            } else {
279
                echo "\"Class\"";
280
            }
281
            echo ", ";
282 View Code Duplication
            if ($this->getAttribute($context["class"], "namespace", 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...
283
                echo "\"fromName\": \"";
284
                echo twig_replace_filter($this->getAttribute($context["class"], "namespace", array()), array("\\" => "\\\\"));
285
                echo "\", \"fromLink\": \"";
286
                echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["class"], "namespace", array()));
287
                echo "\",";
288
            }
289
            echo " \"link\": \"";
290
            echo $this->env->getExtension('sami')->pathForClass($context, $context["class"]);
291
            echo "\", \"name\": \"";
292
            echo twig_replace_filter($this->getAttribute($context["class"], "name", array()), array("\\" => "\\\\"));
293
            echo "\", \"doc\": \"";
294
            echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"])), "html", null, true);
295
            echo "\"},
296
                ";
297
            // line 33
298
            echo $context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"]->getadd_class_methods_index($context["class"]);
299
            echo "
300
            ";
301
        }
302
        $_parent = $context['_parent'];
303
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']);
304
        $context = array_intersect_key($context, $_parent) + $_parent;
305
        // line 35
306
        echo "
307
            ";
308
        // line 37
309
        echo "            ";
310
        $this->displayBlock('search_index_extra', $context, $blocks);
311
        // line 38
312
        echo "        ";
313
    }
314
315
    // line 37
316
    public function block_search_index_extra($context, array $blocks = array())
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...
317
    {
318
        echo "";
319
    }
320
321
    // line 156
322
    public function block_treejs($context, array $blocks = array())
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...
323
    {
324
        // line 157
325
        echo "
326
        // Toggle left-nav divs on click
327
        \$('#api-tree .hd span').click(function() {
328
            \$(this).parent().parent().toggleClass('opened');
329
        });
330
331
        // Expand the parent namespaces of the current page.
332
        var expected = \$('body').attr('data-name');
333
334
        if (expected) {
335
            // Open the currently selected node and its parents.
336
            var container = \$('#api-tree');
337
            var node = \$('#api-tree li[data-name=\"' + expected + '\"]');
338
            // Node might not be found when simulating namespaces
339
            if (node.length > 0) {
340
                node.addClass('active').addClass('opened');
341
                node.parents('li').addClass('opened');
342
                var scrollPos = node.offset().top - container.offset().top + container.scrollTop();
343
                // Position the item nearer to the top of the screen.
344
                scrollPos -= 200;
345
                container.scrollTop(scrollPos);
346
            }
347
        }
348
349
    ";
350
    }
351
352
    // line 213
353
    public function getadd_class_methods_index($__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...
354
    {
355
        $context = $this->env->mergeGlobals(array(
356
            "class" => $__class__,
357
            "varargs" => $__varargs__,
358
        ));
359
360
        $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...
361
362
        ob_start();
363
        try {
364
            // line 214
365
            echo "    ";
366
            if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "methods", array())) {
367
                // line 215
368
                echo "        ";
369
                $context["from_name"] = twig_replace_filter($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "name", array()), array("\\" => "\\\\"));
370
                // line 216
371
                echo "        ";
372
                $context["from_link"] = $this->env->getExtension('sami')->pathForClass($context, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")));
373
                // line 217
374
                echo "        ";
375
                $context['_parent'] = $context;
376
                $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "methods", array()));
377
                foreach ($context['_seq'] as $context["_key"] => $context["meth"]) {
378
                    // line 218
379
                    echo "            {\"type\": \"Method\", \"fromName\": \"";
380
                    echo (isset($context["from_name"]) ? $context["from_name"] : $this->getContext($context, "from_name"));
381
                    echo "\", \"fromLink\": \"";
382
                    echo (isset($context["from_link"]) ? $context["from_link"] : $this->getContext($context, "from_link"));
383
                    echo "\", \"link\": \"";
384
                    echo $this->env->getExtension('sami')->pathForMethod($context, $context["meth"]);
385
                    echo "\", \"name\": \"";
386
                    echo twig_replace_filter($context["meth"], array("\\" => "\\\\"));
387
                    echo "\", \"doc\": \"";
388
                    echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["meth"], "shortdesc", array()), (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")))), "html", null, true);
389
                    echo "\"},
390
        ";
391
                }
392
                $_parent = $context['_parent'];
393
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['meth'], $context['_parent'], $context['loop']);
394
                $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...
395
                // line 220
396
                echo "    ";
397
            }
398
        } catch (Exception $e) {
399
            ob_end_clean();
400
401
            throw $e;
402
        } 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...
403
            ob_end_clean();
404
405
            throw $e;
406
        }
407
408
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
409
    }
410
411
    // line 223
412
    public function getelement($__tree__ = null, $__opened__ = null, $__depth__ = null, ...$__varargs__)
413
    {
414
        $context = $this->env->mergeGlobals(array(
415
            "tree" => $__tree__,
416
            "opened" => $__opened__,
417
            "depth" => $__depth__,
418
            "varargs" => $__varargs__,
419
        ));
420
421
        $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...
422
423
        ob_start();
424
        try {
425
            // line 224
426
            echo "    ";
427
            $context["__internal_203852106d81b21fad240b3e53ecbd07d6dc0c94215c15f2799adb4e5d97d8fa"] = $this;
428
            // line 225
429
            echo "
430
    <ul>";
431
            // line 227
432
            $context['_parent'] = $context;
433
            $context['_seq'] = twig_ensure_traversable((isset($context["tree"]) ? $context["tree"] : $this->getContext($context, "tree")));
434
            foreach ($context['_seq'] as $context["_key"] => $context["element"]) {
435
                // line 228
436
                if ($this->getAttribute($context["element"], 2, array(), "array")) {
437
                    // line 229
438
                    echo "                <li data-name=\"namespace:";
439
                    echo twig_replace_filter($this->getAttribute($context["element"], 1, array(), "array"), array("\\" => "_"));
440
                    echo "\" ";
441 View Code Duplication
                    if (((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) < (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")))) {
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...
442
                        echo "class=\"opened\"";
443
                    }
444
                    echo ">
445
                    <div style=\"padding-left:";
446
                    // line 230
447
                    echo ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) * 18);
448
                    echo "px\" class=\"hd\">
449
                        <span class=\"glyphicon glyphicon-play\"></span>";
450
                    // line 231
451 View Code Duplication
                    if ( !$this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "simulate_namespaces"), "method")) {
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...
452
                        echo "<a href=\"";
453
                        echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["element"], 1, array(), "array"));
454
                        echo "\">";
455
                    }
456
                    echo $this->getAttribute($context["element"], 0, array(), "array");
457
                    if ( !$this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "simulate_namespaces"), "method")) {
458
                        echo "</a>";
459
                    }
460
                    // line 232
461
                    echo "                    </div>
462
                    <div class=\"bd\">
463
                        ";
464
                    // line 234
465
                    echo $context["__internal_203852106d81b21fad240b3e53ecbd07d6dc0c94215c15f2799adb4e5d97d8fa"]->getelement($this->getAttribute($context["element"], 2, array(), "array"), (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")), ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) + 1));
466
                    // line 235
467
                    echo "</div>
468
                </li>
469
            ";
470
                } else {
471
                    // line 238
472
                    echo "                <li data-name=\"class:";
473
                    echo twig_escape_filter($this->env, twig_replace_filter($this->getAttribute($this->getAttribute($context["element"], 1, array(), "array"), "name", array()), array("\\" => "_")), "html", null, true);
474
                    echo "\" ";
475 View Code Duplication
                    if (((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) < (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")))) {
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...
476
                        echo "class=\"opened\"";
477
                    }
478
                    echo ">
479
                    <div style=\"padding-left:";
480
                    // line 239
481
                    echo twig_escape_filter($this->env, (8 + ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) * 18)), "html", null, true);
482
                    echo "px\" class=\"hd leaf\">
483
                        <a href=\"";
484
                    // line 240
485
                    echo $this->env->getExtension('sami')->pathForClass($context, $this->getAttribute($context["element"], 1, array(), "array"));
486
                    echo "\">";
487
                    echo twig_escape_filter($this->env, $this->getAttribute($context["element"], 0, array(), "array"), "html", null, true);
488
                    echo "</a>
489
                    </div>
490
                </li>
491
            ";
492
                }
493
            }
494
            $_parent = $context['_parent'];
495
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']);
496
            $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...
497
            // line 245
498
            echo "    </ul>
499
";
500
        } catch (Exception $e) {
501
            ob_end_clean();
502
503
            throw $e;
504
        } 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...
505
            ob_end_clean();
506
507
            throw $e;
508
        }
509
510
        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
511
    }
512
513
    public function getTemplateName()
514
    {
515
        return "sami.js.twig";
516
    }
517
518
    public function isTraitable()
519
    {
520
        return false;
521
    }
522
523
    public function getDebugInfo()
524
    {
525
        return array (  498 => 245,  485 => 240,  481 => 239,  472 => 238,  467 => 235,  465 => 234,  461 => 232,  451 => 231,  447 => 230,  438 => 229,  436 => 228,  432 => 227,  429 => 225,  426 => 224,  412 => 223,  396 => 220,  379 => 218,  374 => 217,  371 => 216,  368 => 215,  365 => 214,  353 => 213,  325 => 157,  322 => 156,  316 => 37,  312 => 38,  309 => 37,  306 => 35,  298 => 33,  275 => 32,  271 => 31,  268 => 30,  260 => 28,  243 => 27,  239 => 26,  236 => 25,  224 => 23,  220 => 22,  217 => 21,  214 => 20,  211 => 19,  206 => 222,  173 => 210,  170 => 182,  168 => 156,  49 => 39,  47 => 19,  31 => 7,  24 => 2,  22 => 1,);
526
    }
527
}
528
/* {% from _self import element %}*/
529
/* */
530
/* (function(root) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% 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...
531
/* */
532
/*     var bhIndex = null;*/
533
/*     var rootPath = '';*/
534
/*     var treeHtml = '{{ element(tree, project.config('default_opened_level'), 0)|replace({"'": "\\'", "\n": ''})|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...
535
/* */
536
/*     var searchTypeClasses = {*/
537
/*         'Namespace': 'label-default',*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
538
/*         'Class': 'label-info',*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
539
/*         'Interface': 'label-primary',*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
540
/*         'Trait': 'label-success',*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
541
/*         'Method': 'label-danger',*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
542
/*         '_': 'label-warning'*/
543
/*     };*/
544
/* */
545
/*     var searchIndex = [*/
546
/*         {% block search_index %}*/
547
/*             {% from _self import add_class_methods_index %}*/
548
/* */
549
/*             {% for ns in namespaces -%}*/
550
/*                 {"type": "Namespace", "link": "{{ namespace_path(ns) }}", "name": "{{ ns|replace({'\\': '\\\\'})|raw }}", "doc": "Namespace {{ ns|replace({'\\': '\\\\'})|raw }}"},*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% 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...
551
/*             {%- endfor %}*/
552
/* */
553
/*             {% for class in interfaces -%}*/
554
/*                 {"type": "Interface", {% if class.namespace %}"fromName": "{{ class.namespace|replace({'\\': '\\\\'})|raw }}", "fromLink": "{{ namespace_path(class.namespace)|raw }}",{% endif %} "link": "{{ class_path(class) }}", "name": "{{ class.name|replace({'\\': '\\\\'})|raw }}", "doc": "{{ class.shortdesc|desc(class)|json_encode }}"},*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
61% 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...
555
/*                 {{ add_class_methods_index(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...
556
/*             {% 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...
557
/* */
558
/*             {% for class in classes -%}*/
559
/*                 {"type": {% if class.isTrait %}"Trait"{% else %}"Class"{% endif %}, {% if class.namespace %}"fromName": "{{ class.namespace|replace({'\\': '\\\\'})|raw }}", "fromLink": "{{ namespace_path(class.namespace) }}",{% endif %} "link": "{{ class_path(class) }}", "name": "{{ class.name|replace({'\\': '\\\\'})|raw }}", "doc": "{{ class.shortdesc|desc(class)|json_encode }}"},*/
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...
560
/*                 {{ add_class_methods_index(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...
561
/*             {% 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...
562
/* */
563
/*             {# Override this block, search_index_extra, to add custom search entries! #}*/
564
/*             {% block search_index_extra '' %}*/
565
/*         {% endblock %}*/
566
/*         // Fix trailing commas in the index*/
567
/*         {}*/
568
/*     ];*/
569
/* */
570
/*     /** Tokenizes strings by namespaces and functions *//* */
571
/*     function tokenizer(term) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
572
/*         if (!term) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
56% 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...
573
/*             return [];*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
574
/*         }*/
575
/* */
576
/*         var tokens = [term];*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
37% 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...
577
/*         var meth = term.indexOf('::');*/
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...
578
/* */
579
/*         // Split tokens into methods if "::" is found.*/
580
/*         if (meth > -1) {*/
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...
581
/*             tokens.push(term.substr(meth + 2));*/
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...
582
/*             term = term.substr(0, meth - 2);*/
583
/*         }*/
584
/* */
585
/*         // Split by namespace or fake namespace.*/
586
/*         if (term.indexOf('\\') > -1) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
587
/*             tokens = tokens.concat(term.split('\\'));*/
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...
588
/*         } else if (term.indexOf('_') > 0) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
48% 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...
589
/*             tokens = tokens.concat(term.split('_'));*/
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...
590
/*         }*/
591
/* */
592
/*         // Merge in splitting the string by case and return*/
593
/*         tokens = tokens.concat(term.match(/(([A-Z]?[^A-Z]*)|([a-z]?[^a-z]*))/g).slice(0,-1));*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
49% 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...
594
/* */
595
/*         return tokens;*/
596
/*     };*/
597
/* */
598
/*     root.Sami = {*/
599
/*         /***/
600
/*          * Cleans the provided term. If no term is provided, then one is*/
601
/*          * grabbed from the query string "search" parameter.*/
602
/*          *//* */
603
/*         cleanSearchTerm: function(term) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
604
/*             // Grab from the query string*/
605
/*             if (typeof term === 'undefined') {*/
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...
606
/*                 var name = 'search';*/
607
/*                 var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");*/
608
/*                 var results = regex.exec(location.search);*/
609
/*                 if (results === null) {*/
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...
610
/*                     return null;*/
611
/*                 }*/
612
/*                 term = decodeURIComponent(results[1].replace(/\+/g, " "));*/
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...
613
/*             }*/
614
/* */
615
/*             return term.replace(/<(?:.|\n)*?>/gm, '');*/
616
/*         },*/
617
/* */
618
/*         /** Searches through the index for a given term *//* */
619
/*         search: function(term) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
620
/*             // Create a new search index if needed*/
621
/*             if (!bhIndex) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
56% 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...
622
/*                 bhIndex = new Bloodhound({*/
623
/*                     limit: 500,*/
624
/*                     local: searchIndex,*/
625
/*                     datumTokenizer: function (d) {*/
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...
626
/*                         return tokenizer(d.name);*/
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...
627
/*                     },*/
628
/*                     queryTokenizer: Bloodhound.tokenizers.whitespace*/
629
/*                 });*/
630
/*                 bhIndex.initialize();*/
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...
631
/*             }*/
632
/* */
633
/*             results = [];*/
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...
634
/*             bhIndex.get(term, function(matches) {*/
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...
635
/*                 results = matches;*/
636
/*             });*/
637
/* */
638
/*             if (!rootPath) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
56% 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...
639
/*                 return results;*/
640
/*             }*/
641
/* */
642
/*             // Fix the element links based on the current page depth.*/
643
/*             return $.map(results, function(ele) {*/
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...
644
/*                 if (ele.link.indexOf('..') > -1) {*/
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...
645
/*                     return ele;*/
646
/*                 }*/
647
/*                 ele.link = rootPath + ele.link;*/
648
/*                 if (ele.fromLink) {*/
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...
649
/*                     ele.fromLink = rootPath + ele.fromLink;*/
650
/*                 }*/
651
/*                 return ele;*/
652
/*             });*/
653
/*         },*/
654
/* */
655
/*         /** Get a search class for a specific type *//* */
656
/*         getSearchClass: function(type) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
657
/*             return searchTypeClasses[type] || searchTypeClasses['_'];*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% 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...
658
/*         },*/
659
/* */
660
/*         /** Add the left-nav tree to the site *//* */
661
/*         injectApiTree: function(ele) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% 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...
662
/*             ele.html(treeHtml);*/
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...
663
/*         }*/
664
/*     };*/
665
/* */
666
/*     $(function() {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% 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...
667
/*         // Modify the HTML to work correctly based on the current depth*/
668
/*         rootPath = $('body').attr('data-root-path');*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% 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...
669
/*         treeHtml = treeHtml.replace(/href="/g, 'href="' + rootPath);*/
670
/*         Sami.injectApiTree($('#api-tree'));*/
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...
671
/*     });*/
672
/* */
673
/*     return root.Sami;*/
674
/* })(window);*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
72% 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...
675
/* */
676
/* $(function() {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% 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...
677
/* */
678
/*     // Enable the version switcher*/
679
/*     $('#version-switcher').change(function() {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% 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...
680
/*         window.location = $(this).val()*/
681
/*     });*/
682
/* */
683
/*     {% block treejs %}*/
684
/* */
685
/*         // Toggle left-nav divs on click*/
686
/*         $('#api-tree .hd span').click(function() {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% 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...
687
/*             $(this).parent().parent().toggleClass('opened');*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
69% 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...
688
/*         });*/
689
/* */
690
/*         // Expand the parent namespaces of the current page.*/
691
/*         var expected = $('body').attr('data-name');*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
53% 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...
692
/* */
693
/*         if (expected) {*/
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...
694
/*             // Open the currently selected node and its parents.*/
695
/*             var container = $('#api-tree');*/
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...
696
/*             var node = $('#api-tree li[data-name="' + expected + '"]');*/
697
/*             // Node might not be found when simulating namespaces*/
698
/*             if (node.length > 0) {*/
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...
699
/*                 node.addClass('active').addClass('opened');*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% 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...
700
/*                 node.parents('li').addClass('opened');*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% 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...
701
/*                 var scrollPos = node.offset().top - container.offset().top + container.scrollTop();*/
702
/*                 // Position the item nearer to the top of the screen.*/
703
/*                 scrollPos -= 200;*/
704
/*                 container.scrollTop(scrollPos);*/
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...
705
/*             }*/
706
/*         }*/
707
/* */
708
/*     {% endblock %}*/
709
/* */
710
/*     {% verbatim %}*/
711
/*         var form = $('#search-form .typeahead');*/
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...
712
/*         form.typeahead({*/
713
/*             hint: true,*/
714
/*             highlight: true,*/
715
/*             minLength: 1*/
716
/*         }, {*/
717
/*             name: 'search',*/
718
/*             displayKey: 'name',*/
719
/*             source: function (q, cb) {*/
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...
720
/*                 cb(Sami.search(q));*/
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...
721
/*             }*/
722
/*         });*/
723
/* */
724
/*         // The selection is direct-linked when the user selects a suggestion.*/
725
/*         form.on('typeahead:selected', function(e, suggestion) {*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
48% 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...
726
/*             window.location = suggestion.link;*/
727
/*         });*/
728
/* */
729
/*         // The form is submitted when the user hits enter.*/
730
/*         form.keypress(function (e) {*/
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...
731
/*             if (e.which == 13) {*/
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...
732
/*                 $('#search-form').submit();*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% 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...
733
/*                 return true;*/
734
/*             }*/
735
/*         });*/
736
/* */
737
/*     {% endverbatim %}*/
738
/* });*/
739
/* */
740
/* {% macro add_class_methods_index(class) %}*/
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...
741
/*     {% if class.methods %}*/
742
/*         {% set from_name = class.name|replace({'\\': '\\\\'}) %}*/
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...
743
/*         {% set from_link = class_path(class) %}*/
744
/*         {% for meth in class.methods %}*/
745
/*             {"type": "Method", "fromName": "{{ from_name|raw }}", "fromLink": "{{ from_link|raw }}", "link": "{{ method_path(meth) }}", "name": "{{ meth|replace({'\\': '\\\\'})|raw }}", "doc": "{{ meth.shortdesc|desc(class)|json_encode }}"},*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
69% 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...
746
/*         {% 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...
747
/*     {% 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...
748
/* {% endmacro %}*/
749
/* */
750
/* {% macro element(tree, opened, depth) %}*/
751
/*     {% from _self import element %}*/
752
/* */
753
/*     <ul>*/
754
/*         {%- for element in tree -%}*/
755
/*             {% if element[2] %}*/
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...
756
/*                 <li data-name="namespace:{{ element[1]|replace({'\\': '_'})|raw }}" {% if depth < opened %}class="opened"{% endif %}>*/
757
/*                     <div style="padding-left:{{ (depth * 18)|raw }}px" class="hd">*/
758
/*                         <span class="glyphicon glyphicon-play"></span>{% if not project.config('simulate_namespaces') %}<a href="{{ namespace_path(element[1]) }}">{% endif %}{{ element[0]|raw }}{% if not project.config('simulate_namespaces') %}</a>{% 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...
759
/*                     </div>*/
760
/*                     <div class="bd">*/
761
/*                         {{ element(element[2], opened, depth + 1) -}}*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
48% 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...
762
/*                     </div>*/
763
/*                 </li>*/
764
/*             {% 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...
765
/*                 <li data-name="class:{{ (element[1].name)|replace({'\\': '_'}) }}" {% if depth < opened %}class="opened"{% endif %}>*/
766
/*                     <div style="padding-left:{{ 8 + (depth * 18) }}px" class="hd leaf">*/
767
/*                         <a href="{{ class_path(element[1]) }}">{{ element[0] }}</a>*/
0 ignored issues
show
Unused Code Comprehensibility introduced by
37% 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...
768
/*                     </div>*/
769
/*                 </li>*/
770
/*             {% 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...
771
/*         {%- endfor %}*/
772
/*     </ul>*/
773
/* {% endmacro %}*/
774
/* */
775