Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
// Module Info
// The name of this module
define('_MI_CONTACT_NAME', 'Kontakt');
define('_MI_CONTACT_DESC', 'Modul für Kontaktformular (mit Speicherung in Datenbank)');
- 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 1082.
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
Line exceeds 120 characters; contains 155 characters Open
. 'Wenn keine Abteilung/kein Empfänger angegeben wird, wird die Mailnachricht an die Standard-E-Mail-Adresse versendet.');
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
define('_MI_CONTACT_SUBJECT_PREFIX_DESC', 'Wenn ja, dann wird der Name der Abteilung als Präfix im E-Mail-Betreff verwendet');
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
define('_MI_CONTACT_FORM_RECAPTCHA_KEY_DESC', "Mehr über Google reCaptcha unter https://www.google.com/recaptcha <br>und unter 'Hilfe'.");
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
define('_MI_CONTACT_FORM_RECAPTCHA_USE_DESC', 'Wähle <em>Ja</em>, um reCaptcha im Eingabeformular zu verwenden.<br>Standard: <em>Nein</em>');
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
define('_MI_B_CONTACT_FORM_MAP_DESC', 'Ein Kontaktformular zusammen mit dem Standort in Google Maps als Block anzeigen');
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
define('_MI_B_CONTACT_INFO_MAP_DESC', 'Ein Kontaktinformation zusammen mit dem Standort in Google Maps als Block anzeigen');
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
define('_MI_CONTACT_DEPT_DESC', 'Diese Option erlaubt die Angabe/Kombination von verschiedenen Abteilungen/Empfängern.<br>'
- Exclude checks
Line exceeds 120 characters; contains 174 characters Open
. "abteilung1,email1|abteilung2,email2|abteilung3,email3 etc. - jede Abteilung muss von der E-Mail mit einem Beistrich ',' getrennt sein,<br>"
- Exclude checks
Line exceeds 120 characters; contains 179 characters Open
define('_MI_CONTACT_DEFAULT_DESC', 'Hier können die Kontaktdaten angegeben werden, die zusätzlich zum Formular angezeigt werden sollen (z.B. Name, Adresse , Telefonnummer,...');
- Exclude checks
Line exceeds 120 characters; contains 177 characters Open
. 'Je nach Benutzerauswahl erhält die entsprechende Abteilung die jeweilige Kontaktinformation an die dafür definierte E-Mail-Adresse.<br><br>'
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
. "und jede Kombination Abteilung/E-Mail muss durch einen Strich '|' getrennt sein.<br><br>"
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
define('_MI_CONTACT_MAIL_CONFIRM_DESC', 'Wenn ja, wird an die angegebene E-Mail-Adresse eine kurze Bestätigungsmail mit den wichtigsten Informationen gesendet');
- Exclude checks