runcmf/runtracy

View on GitHub

Showing 4 of 36 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<?php
/**
 * Copyright 2016 1f7.wizard@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
Severity: Major
Found in src/RunTracy/Helpers/SlimResponsePanel.php and 1 other location - About 4 hrs to fix
src/RunTracy/Helpers/SlimRequestPanel.php on lines 1..54

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<?php
/**
 * Copyright 2016 1f7.wizard@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
Severity: Major
Found in src/RunTracy/Helpers/SlimRequestPanel.php and 1 other location - About 4 hrs to fix
src/RunTracy/Helpers/SlimResponsePanel.php on lines 1..54

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        $this->icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 532 178" style="width: 35px"><path '.
            'fill="#016301" d="m439 153.67c-13.839-3.3534-27.492-13.852-34.543-26.563-1.9832-3.575-4.8271-10.55-'.
            '6.3198-15.5-2.4268-8.0476-2.7156-10.587-2.7288-24-0.0174-17.571 1.7519-25.761 8.271-38.287 7.21-13.853'.
            ' 17.154-22.854 31.034-28.09 5.3616-2.0225 8.3741-2.4659 17.015-2.5047 9.3728-0.04211 11.552 0.31335 '.
            '20.304 3.3111l9.8037 3.3582 3.3143-3.2123c2.7653-2.6803 3.9534-3.1596 7.1733-2.8941 5.9886 0.49386 '.
Severity: Major
Found in src/RunTracy/Helpers/TwigPanel.php and 1 other location - About 3 hrs to fix
src/RunTracy/Helpers/SlimRouterPanel.php on lines 37..70

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 133.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        $this->icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" version="1.1" width="16px" '.
            'height="16px"><path fill="#043CBF" d="m221.25 479.1c-79.88-6.85-150.37-51.83-189.99-121.24-14.666-'.
            '25.69-23.972-53.8-29.552-89.27-0.70825-4.5-1.1632-16.11-1.1384-29.06 0.04489-23.34 1.5027-35.94 6.5464'.
            '-56.54 14.241-58.18 49.919-109.05 99.764-142.23 30.47-20.29 60.66-31.962 98.61-38.123 10.115-1.6422 '.
            '16.564-2.0339 34.042-2.0675 12.945-0.024869 24.56 0.43011 29.062 1.1385 35.467 5.5797 63.58 14.886 '.
Severity: Major
Found in src/RunTracy/Helpers/SlimRouterPanel.php and 1 other location - About 3 hrs to fix
src/RunTracy/Helpers/TwigPanel.php on lines 36..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 133.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language