File album.php
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ExtGallery Admin settings
* Manage admin pages
*
Avoid deeply nested control flow statements. Open
if ($helper->getConfig('album_tooltip_width') != $_POST['album_tooltip_width']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_tooltip_width'));
/** @var \XoopsObject $config */
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_showtype', 'POST')) {
if ($helper->getConfig('album_fancybox_showtype') != $_POST['album_fancybox_showtype']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_showtype'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_tout', 'POST')) {
if ($helper->getConfig('album_fancybox_tout') != $_POST['album_fancybox_tout']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_tout'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_prettyphoto_theme', 'POST')) {
if ($helper->getConfig('album_prettyphoto_theme') != $_POST['album_prettyphoto_theme']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_prettyphoto_theme'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_overlay_bg', 'POST')) {
if ($helper->getConfig('album_overlay_bg') != $_POST['album_overlay_bg']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_overlay_bg'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_tooltip_width', 'POST')) {
if ($helper->getConfig('album_tooltip_width') != $_POST['album_tooltip_width']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_tooltip_width'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_tooltip_borderwidth', 'POST')) {
if ($helper->getConfig('album_tooltip_borderwidth') != $_POST['album_tooltip_borderwidth']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_tooltip_borderwidth'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_overlay_width', 'POST')) {
if ($helper->getConfig('album_overlay_width') != $_POST['album_overlay_width']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_overlay_width'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_tin', 'POST')) {
if ($helper->getConfig('album_fancybox_tin') != $_POST['album_fancybox_tin']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_tin'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_title', 'POST')) {
if ($helper->getConfig('album_fancybox_title') != $_POST['album_fancybox_title']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_title'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_prettyphoto_autopla', 'POST')) {
if ($helper->getConfig('album_prettyphoto_autopla') != $_POST['album_prettyphoto_autopla']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_prettyphoto_autopla'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_opacity', 'POST')) {
if ($helper->getConfig('album_fancybox_opacity') != $_POST['album_fancybox_opacity']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_opacity'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_tooltip_bordercolor', 'POST')) {
if ($helper->getConfig('album_tooltip_bordercolor') != $_POST['album_tooltip_bordercolor']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_tooltip_bordercolor'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_overlay_height', 'POST')) {
if ($helper->getConfig('album_overlay_height') != $_POST['album_overlay_height']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_overlay_height'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_fancybox_color', 'POST')) {
if ($helper->getConfig('album_fancybox_color') != $_POST['album_fancybox_color']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_fancybox_color'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_prettyphoto_speed', 'POST')) {
if ($helper->getConfig('album_prettyphoto_speed') != $_POST['album_prettyphoto_speed']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_prettyphoto_speed'));
- 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 163.
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
Similar blocks of code found in 55 locations. Consider refactoring. Open
if (Request::hasVar('album_prettyphoto_slidspe', 'POST')) {
if ($helper->getConfig('album_prettyphoto_slidspe') != $_POST['album_prettyphoto_slidspe']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_prettyphoto_slidspe'));
- 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 163.
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
The CASE body must start on the line following the statement Open
case 'overlay':
- Exclude checks
The CASE body must start on the line following the statement Open
case 'tooltip':
- Exclude checks
The DEFAULT body must start on the line following the statement Open
default:
- Exclude checks
The CASE body must start on the line following the statement Open
case 'default':
- Exclude checks
The CASE body must start on the line following the statement Open
case 'fancybox':
- Exclude checks
The CASE body must start on the line following the statement Open
case 'prettyphoto':
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$form = new \XoopsThemeForm(_AM_EXTGALLERY_PRETTPHOTO_CONF, 'prettyphoto_conf', 'album.php', 'post', true);
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_OVERLAY_BG, 'album_overlay_bg', $helper->getConfig('album_overlay_bg')), false);
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
$fancyboxtpSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TITLEPOSITION, 'album_fancybox_title', $helper->getConfig('album_fancybox_title'));
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
$prettythemeSelect = new \XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_THEME, 'album_prettyphoto_theme', $helper->getConfig('album_prettyphoto_theme'));
- Exclude checks
Line exceeds 120 characters; contains 179 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_PRETTPHOTO_SLIDESPEED, 'album_prettyphoto_slidspe', '5', '5', $helper->getConfig('album_prettyphoto_slidspe')), false);
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_TOOLTIP_WIDTH, 'album_tooltip_width', '6', '6', $helper->getConfig('album_tooltip_width')), false);
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
$fancyboxtinSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TIN, 'album_fancybox_tin', $helper->getConfig('album_fancybox_tin'));
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
$prettyspeedSelect = new \XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_SPEED, 'album_prettyphoto_speed', $helper->getConfig('album_prettyphoto_speed'));
- Exclude checks
Line exceeds 120 characters; contains 174 characters Open
$form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_TOOLTIP_BORDERCOLOR, 'album_tooltip_bordercolor', $helper->getConfig('album_tooltip_bordercolor')), false);
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_OVERLAY_HEIGHT, 'album_overlay_height', '5', '5', $helper->getConfig('album_overlay_height')), false);
- Exclude checks
Line exceeds 120 characters; contains 178 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_TOOLTIP_BORDER_WIDTH, 'album_tooltip_borderwidth', '6', '6', $helper->getConfig('album_tooltip_borderwidth')), false);
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_OVERLAY_WIDTH, 'album_overlay_width', '5', '5', $helper->getConfig('album_overlay_width')), false);
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$fancyboxtoutSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_TOUT, 'album_fancybox_tout', $helper->getConfig('album_fancybox_tout'));
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
$fancyboxshowSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FANCYBOX_SHOWTYPE, 'album_fancybox_showtype', $helper->getConfig('album_fancybox_showtype'));
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$prettyautoplaySelect = new \XoopsFormSelect(_AM_EXTGALLERY_PRETTPHOTO_AUTOPLAY, 'album_prettyphoto_autopla', $helper->getConfig('album_prettyphoto_autopla'));
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_FANCYBOX_BGCOLOR, 'album_fancybox_color', $helper->getConfig('album_fancybox_color')), false);
- Exclude checks
Line exceeds 120 characters; contains 168 characters Open
$form->addElement(new \XoopsFormText(_AM_EXTGALLERY_FANCYBOX_OPACITY, 'album_fancybox_opacity', '6', '6', $helper->getConfig('album_fancybox_opacity')), false);
- Exclude checks