Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
if (defined('FOR_XOOPS_LANG_CHECKER') || !defined('_APCAL_CNST_LOADED')) {
define('_APCAL_CNST_LOADED', 1);
- 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 3146.
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
Blank line found at end of control structure Open
- Exclude checks
Line exceeds 120 characters; contains 178 characters Open
// define('_APCAL_RO_EXTRAINFO1', 'Telephone'); //use it as you want; if you keep it blank, it will be invisible; if you change later, it has no effect on the data himself
- Exclude checks
Line exceeds 120 characters; contains 163 characters Open
define('_APCAL_RO_DATAPRIVACY_DETAIL', 'The data of the participants will only be stored for the duration of the event and not forwarded to third person.<br />
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
define('_APCAL_RO_PUT_ON_WAITINGLIST2','The registration have been put on a waiting list and must be confirmed manually!');
- Exclude checks
Line exceeds 120 characters; contains 177 characters Open
During the event pictures will be taken and maybe used for internal purposes (e.g. showing on our website). If you are not agreeing that you have to contact the organizer.<br />
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
define('_APCAL_RO_MAIL_BODY2', 'The expressions in curly brackets will be replaced (z.B. {NAME} will be replace by first name and last name)');
- Exclude checks
Line exceeds 120 characters; contains 222 characters Open
define('_APCAL_RO_PUT_ON_WAITINGLIST','For this event are no more places available! Your registration have been put on a waiting list! If your participation will be confirmed late you will get an email notification.');
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
define('_APCAL_RO_EMAIL_NOTIFY', 'E-mail-address, which should be notified in case of (de-)registrations (keep blank, if you want no notifications)');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_DOWNLOAD','Download');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS','State');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_MAIL_SUBJ_STATUS','Info state change');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_MISSING_ITEM','Error when saving online registration: Please edit %s ');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_AVAILABLE','Availability');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_PUT_ON_WAITINGLIST','For this event are no more places available! Your registration have been put on a waiting list! If your participation will be confirmed late you will get an email notification.');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_NO_RIGHT','You do not have permissions for online registration. ');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_OK','Participation is confirmed');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_ERROR_STATUS_CONF','Error at confirmation of participation');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_SUCCESS_CHANGE_PENDING',"State have been change to 'not confirmed'");
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_LIST','Online registration was put on waiting list');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_PRINT_LIST','Print list of participants');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_PUT_ON_WAITINGLIST2','The registration have been put on a waiting list and must be confirmed manually!');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_ACT','Each participation must be confirmed');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_LIST_ACT','Put registered person on waiting list if number of max person is reached');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_PENDING','Participation is still not confirmed');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_MAIL_RECEPIENT','Recipient');
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_STATUS_SUCCESS_CHANGE_OK',"State have been change to 'confirmed'");
- Exclude checks
No space found after comma in function call Open
define('_APCAL_RO_GUEST','Guest');
- Exclude checks