File Frontend.php
has 2670 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace SPHERE\Application\Reporting\SerialLetter;
use SPHERE\Application\Api\Reporting\SerialLetter\ApiSerialLetter;
use SPHERE\Application\Contact\Address\Address;
Function frontendSerialLetterPersonSelected
has a Cognitive Complexity of 168 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSerialLetterPersonSelected(
$Id = null,
$FilterGroup = null,
$FilterStudent = null,
$FilterPerson = null,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method frontendSerialLetterPersonSelected
has 658 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendSerialLetterPersonSelected(
$Id = null,
$FilterGroup = null,
$FilterStudent = null,
$FilterPerson = null,
Function frontendPersonAddressEdit
has a Cognitive Complexity of 156 (exceeds 5 allowed). Consider refactoring. Open
public function frontendPersonAddressEdit($Id = null, $PersonId = null, $Route = '/Reporting/SerialLetter/Address', $Check = null)
{
$Stage = new Stage('Adresse(n)', 'Auswählen');
$tblSerialLetter = ( $Id === null ? false : SerialLetter::useService()->getSerialLetterById($Id) );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function frontendSerialLetterExport
has a Cognitive Complexity of 123 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSerialLetterExport(
$Id = null,
$Control = false
) {
$Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen herunterladen');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method frontendSerialLetterEdit
has 373 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendSerialLetterEdit(
$Id = null,
$Control = false,
$SerialLetter = null,
$TabActive = null,
Method frontendSerialLetterExport
has 350 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendSerialLetterExport(
$Id = null,
$Control = false
) {
$Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen herunterladen');
Function frontendSerialLetterEdit
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSerialLetterEdit(
$Id = null,
$Control = false,
$SerialLetter = null,
$TabActive = null,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method frontendPersonAddressEdit
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendPersonAddressEdit($Id = null, $PersonId = null, $Route = '/Reporting/SerialLetter/Address', $Check = null)
{
$Stage = new Stage('Adresse(n)', 'Auswählen');
$tblSerialLetter = ( $Id === null ? false : SerialLetter::useService()->getSerialLetterById($Id) );
Method frontendPersonAddressContent
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function frontendPersonAddressContent($Id = null)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen auswählen');
$Stage->addButton(new Standard('Zurück', '/Reporting/SerialLetter', new ChevronLeft()));
Method frontendSerialLetter
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendSerialLetter(
$SerialLetter = null,
$TabActive = 'STATIC',
$FilterGroup = null,
$FilterPerson = null,
Method frontendCompanyAddressContent
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function frontendCompanyAddressContent($Id = null)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen auswählen');
$Stage->addButton(new Standard('Zurück', '/Reporting/SerialLetter', new ChevronLeft()));
Method frontendCompanyExport
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendCompanyExport(TblSerialLetter $tblSerialLetter)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Institutionen mit Adressen uns Ansprechpartner herunterladen');
$Stage->addButton(new Standard('Zurück', '/Reporting/SerialLetter', new ChevronLeft()));
$Stage->addButton(new Standard('Bearbeiten', '/Reporting/SerialLetter/Edit', new Edit(),
Method frontendAddressRemove
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendAddressRemove($Id = null, $Confirm = false)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Löschen');
if ($Id) {
Method frontendSerialLetterDestroy
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendSerialLetterDestroy($Id = null, $Confirm = false)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Löschen');
if ($Id) {
Function frontendPersonAddress
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function frontendPersonAddress(
$Id = null,
$Control = false
) {
$Stage = new Stage('Adresslisten für Serienbriefe', 'Adressen auswählen');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function frontendAddressRemove
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function frontendAddressRemove($Id = null, $Confirm = false)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Löschen');
if ($Id) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Consider simplifying this complex logical expression. Open
if ($FilterGroup && isset($FilterGroup['TblGroup_Id']) && $FilterGroup['TblGroup_Id'] !== '0'
|| $FilterPerson && ( isset($FilterPerson['TblPerson_FirstName']) && !empty($FilterPerson['TblPerson_FirstName'])
|| $FilterPerson['TblPerson_LastName'] && !empty($FilterPerson['TblPerson_LastName']) )
&& $TabActive === 'PERSON'
) {
Method frontendPersonAddress
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function frontendPersonAddress(
$Id = null,
$Control = false
) {
$Stage = new Stage('Adresslisten für Serienbriefe', 'Adressen auswählen');
Method frontendSerialLetterEdit
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$Id = null,
$Control = false,
$SerialLetter = null,
$TabActive = null,
$FilterGroup = null,
Function frontendSerialLetter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSerialLetter(
$SerialLetter = null,
$TabActive = 'STATIC',
$FilterGroup = null,
$FilterPerson = null,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method frontendSerialLetter
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
$SerialLetter = null,
$TabActive = 'STATIC',
$FilterGroup = null,
$FilterPerson = null,
$FilterStudent = null,
Method frontendSerialLetterPersonSelected
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$Id = null,
$FilterGroup = null,
$FilterStudent = null,
$FilterPerson = null,
$FilterYear = null,
Function frontendSerialLetterDestroy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSerialLetterDestroy($Id = null, $Confirm = false)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Löschen');
if ($Id) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if ($tblToCompany->getServiceTblCompany()->getId() === $tblRelationship->getServiceTblCompany()->getId()) {
$RelationShip = $tblType->getName();
$subDataList[] = array(
'Salutation' => $tblPerson->getSalutation(),
'Person' => $tblPerson->getFullName(),
Avoid deeply nested control flow statements. Open
if ($tblProspectReservation) {
$DataPerson['ProspectYear'] = $tblProspectReservation->getReservationYear();
$DataPerson['ProspectDivision'] = $tblProspectReservation->getReservationDivision();
}
Avoid deeply nested control flow statements. Open
if ($tblProspect) {
$tblProspectReservation = $tblProspect->getTblProspectReservation();
$AddressList[$tblPerson->getId().$tblAddress->getId()]['ReservationDivision'] = $tblProspectReservation->getReservationDivision();
$AddressList[$tblPerson->getId().$tblAddress->getId()]['ReservationYear'] = $tblProspectReservation->getReservationYear();
if ($tblProspectReservation->getServiceTblTypeOptionA()) {
Avoid deeply nested control flow statements. Open
if ($Division === '') {
$Division = new Small(new Muted('-NA-'));
}
Avoid deeply nested control flow statements. Open
if (( $tblAddress = $serviceTblPersonToAddress->getTblAddress() )) {
if (!isset($Data[$tblAddress->getId()]['Person'])) {
$Data[$tblAddress->getId()]['Person'] =
$PersonToAddress->getLastName().' '.$PersonToAddress->getFirstName();
if ($PersonToAddress->getSalutation() === '') {
Avoid deeply nested control flow statements. Open
if ($tblToCompany->getServiceTblCompany()->getId() === $tblRelationship->getServiceTblCompany()->getId()) {
$RelationShip = $tblType->getName();
/** @var TblToPerson $tblRelationship */
$subDataList[] = array(
'Salutation' => $tblPerson->getSalutation(),
Avoid deeply nested control flow statements. Open
if (( $tblAddress = $serviceTblPersonToAddress->getTblAddress() )) {
if (!isset($AddressList[$tblPerson->getId().$tblAddress->getId()]['PersonToWrite'])) {
$AddressList[$tblPerson->getId().$tblAddress->getId()]['PersonToWrite'] =
$PersonToAddress->getLastName().' '.$PersonToAddress->getFirstName();
$AddressList[$tblPerson->getId().$tblAddress->getId()]['SalutationList'] =
Function frontendPersonAddressContent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function frontendPersonAddressContent($Id = null)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen auswählen');
$Stage->addButton(new Standard('Zurück', '/Reporting/SerialLetter', new ChevronLeft()));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if ($tblLevel && $tblYear) {
$VisitedDivisionList[] = new Small(new Muted('Aktuelle Klasse:')).new Container($tblDivision->getDisplayName());
}
Avoid deeply nested control flow statements. Open
if ($tblStudent) {
if ($tblStudent->getIdentifierComplete() != '') {
$StudentNumber = $tblStudent->getIdentifierComplete();
}
}
Consider simplifying this complex logical expression. Open
if (
$FilterGroup === null
&& $FilterStudent === null
&& $FilterPerson === null
&& $FilterYear === null
Consider simplifying this complex logical expression. Open
if ($FilterGroup === null && $FilterStudent === null && $FilterYear === null
&& $FilterProspect === null && $FilterCompany === null && $FilterRelationship === null
) {
if ($tblFilterFieldList) {
foreach ($tblFilterFieldList as $tblFilterField) {
Avoid too many return
statements within this method. Open
return $this->frontendPersonAddressContent($Id);
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function frontendSerialLetterDestroy($Id = null, $Confirm = false)
{
$Stage = new Stage('Adresslisten für Serienbriefe', 'Löschen');
if ($Id) {
- 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 587.
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 2 locations. Consider refactoring. Open
: new Layout(
new LayoutGroup(
new LayoutRow(array(
new LayoutColumn(array(
new TableData($tblPersonList, null,
- 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 479.
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 2 locations. Consider refactoring. Open
new Layout(
new LayoutGroup(
new LayoutRow(array(
new LayoutColumn(array(
new TableData($tblPersonList, null,
- 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 479.
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 2 locations. Consider refactoring. Open
if (!isset($Data[$tblAddress->getId()]['Person'])) {
$Data[$tblAddress->getId()]['Person'] =
$PersonToAddress->getLastName().' '.$PersonToAddress->getFirstName();
if ($PersonToAddress->getSalutation() === '') {
$WarningList[] = $PersonToAddress->getLastName().' '.
- 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 176.
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 2 locations. Consider refactoring. Open
if (!isset($Data[$tblAddress->getId()]['Person'])) {
$Data[$tblAddress->getId()]['Person'] =
$tblPerson->getLastName().' '.$tblPerson->getFirstName();
if ($tblPerson->getSalutation() === '') {
$WarningList[] = $tblPerson->getLastName().' '.
- 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 176.
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 2 locations. Consider refactoring. Open
public function frontendSetAddressByPerson($Id = null)
{
$Stage = new Stage('Befüllen der Adressen', '');
$tblSerialLetter = ( !$Id ? false : SerialLetter::useService()->getSerialLetterById($Id) );
- 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 155.
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 2 locations. Consider refactoring. Open
public function frontendSetAddressByPersonGuardian($Id = null)
{
$Stage = new Stage('Befüllen der Adressen', 'aus Sorgeberechtigten');
$tblSerialLetter = ( !$Id ? false : SerialLetter::useService()->getSerialLetterById($Id) );
- 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 155.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if($tblSerialCompany->getisIgnore()){
$Content = (new Standard('', ApiSerialLetter::getEndpoint(), new SuccessIcon(), array(), 'Exportieren'))
->ajaxPipelineOnClick(ApiSerialLetter::pipelineCompanyChangeStatus($tblSerialCompany->getId()));
} else {
$Content = (new Standard('', ApiSerialLetter::getEndpoint(), new Disable(), array(), 'Nicht Exportieren'))
- 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 113.
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 4 locations. Consider refactoring. Open
if ($FilterType) {
array_walk($FilterType, function (&$Input) {
if (!empty($Input)) {
$Input = explode(' ', $Input);
- 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 104.
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 4 locations. Consider refactoring. Open
if ($FilterYear) {
array_walk($FilterYear, function (&$Input) {
if (!empty($Input)) {
$Input = explode(' ', $Input);
- 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 104.
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 4 locations. Consider refactoring. Open
if ($FilterProspect) {
array_walk($FilterProspect, function (&$Input) {
if (!empty($Input)) {
$Input = explode(' ', $Input);
- 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 104.
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 4 locations. Consider refactoring. Open
if ($FilterPerson) {
array_walk($FilterPerson, function (&$Input) {
if (!empty($Input)) {
$Input = explode(' ', $Input);
- 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 104.
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 2 locations. Consider refactoring. Open
if ($FilterGroup) {
foreach ($FilterGroup as $Field => $Value) {
if ($Value) {
$FormProspect->setSuccess('FilterGroup['.$Field.']', '', new Filter());
}
- 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 90.
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 2 locations. Consider refactoring. Open
if ($FilterGroup) {
foreach ($FilterGroup as $Field => $Value) {
if ($Value) {
$FormGroup->setSuccess('FilterGroup['.$Field.']', '', new Filter());
}
- 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 90.
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