Similar blocks of code found in 3 locations. Consider refactoring. Open
<?php
define("_AM_SBLEFT","Blocco laterale - Sinistra");
define("_AM_SBRIGHT","Blocco laterale - Destra");
define("_AM_CBLEFT","Blocco centrale - Sinistra");
define("_AM_CBRIGHT","Blocco centrale - Destra");
- Read upRead up
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 352.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
No space found after comma in function call Open
define("_AM_SBLEFT","Blocco laterale - Sinistra");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOMRIGHT","Blocco centrale - Basso destra");
- Exclude checks
No space found after comma in function call Open
define("_AM_SBRIGHT","Blocco laterale - Destra");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBCENTER","Blocco centrale - Centro");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBCENTER_ADMIN","Blocco centrale amm. - Centro");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOM","Blocco centrale - Basso");
- Exclude checks
No space found after comma in function call Open
define('_CO_SYSTEM_BLOCKSPADMIN_PNAME_DSC',"Nome della posizione del blocco, sarà con questo nome che sarà creato il Loop nel tema per mostrare il blocco.<br/>Usa un nome con lettere minuscole, senza spazi o caratteri speciali.");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBLEFT_ADMIN","Blocco centrale amm. - Sinistra");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOMLEFT_ADMIN","Blocco centrale amm. - Basso Sinistra");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBRIGHT","Blocco centrale - Destra");
- Exclude checks
No space found after comma in function call Open
define("_AM_SBRIGHT_ADMIN","Blocco laterale amm. - Destra");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOM_ADMIN","Blocco centrale amm. - Basso");
- Exclude checks
Expected 1 newline at end of file; 0 found Open
?>
- Exclude checks
No space found after comma in function call Open
define('_AM_SYSTEM_BLOCKSPADMIN_CREATE',"Aggiungi nuova posizione di blocco");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOMLEFT","Blocco centrale - Basso sinistra");
- Exclude checks
No space found after comma in function call Open
define('_AM_SYSTEM_BLOCKSPADMIN_TITLE',"Amministrazione posizioni blocco");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBBOTTOMRIGHT_ADMIN","Blocco centrale amm. - Basso Destra");
- Exclude checks
No space found after comma in function call Open
define('_AM_SYSTEM_BLOCKSPADMIN_INFO','Per includere nuove posizioni di blocco nel tema, inserire il codice sottostante nella posizione desiderata sul tema, dove desideri che il blocco appaia.
- Exclude checks
No space found after comma in function call Open
define("_AM_CBLEFT","Blocco centrale - Sinistra");
- Exclude checks
No space found after comma in function call Open
define("_AM_SBLEFT_ADMIN","Blocco laterale amm. - Sinistra");
- Exclude checks
A closing tag is not permitted at the end of a PHP file Open
?>
- Exclude checks
No space found after comma in function call Open
define('_AM_SYSTEM_BLOCKSPADMIN_EDIT',"Modifica posizione di blocco");
- Exclude checks
No space found after comma in function call Open
define("_AM_CBRIGHT_ADMIN","Blocco centrale amm. - Destra");
- Exclude checks