Showing 306,333 of 306,333 total issues
File ConfReport.php
has 1266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Conf report class.
*
File Field.php
has 1260 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
Function getGlobalDefaultChartsOptions
has 649 lines of code (exceeds 25 allowed). Consider refactoring. Open
getGlobalDefaultChartsOptions: function getGlobalDefaultChartsOptions(chartSubType, chartData) {
const options = {
bar: {
basic: {
maintainAspectRatio: false,
Similar blocks of code found in 2 locations. Consider refactoring. Open
<?php
/**
* LettersOut CRMEntity class.
*
- 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 605.
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
<?php
/**
* LettersIn CRMEntity class.
*
- 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 605.
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
File PrivilegeUtil.php
has 1195 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Privilege Util basic class.
*
* @package App
Function updateTables
has a Cognitive Complexity of 150 (exceeds 5 allowed). Consider refactoring. Open
public function updateTables(Base $importer)
{
$this->logs .= "> start update tables ({$importer->dbType})\n";
$startMain = microtime(true);
$schema = $importer->db->getSchema();
- 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
File Chat.php
has 1168 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Chat file.
*
Identical blocks of code found in 2 locations. Consider refactoring. Open
let preQuickCreateSave = function (data) {
let index, queryParam, queryParamComponents;
let queryParameters = [];
if (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -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 490.
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
let preQuickCreateSave = function (data) {
let index, queryParam, queryParamComponents;
let queryParameters = [];
if (typeof fullFormUrl !== 'undefined' && fullFormUrl.indexOf('?') !== -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 490.
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
Function checkPermission
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. Open
public static function checkPermission($moduleName, $actionName = null, $record = false, $userId = false)
{
\App\Log::trace("Entering isPermitted($moduleName,$actionName,$record,$userId) method ...");
if (!$userId) {
$userId = \App\User::getCurrentUserId();
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
getUi: function () {
let comparatorSelectedOptionVal = this.get('comparatorElementVal'),
dateSpecificConditions = this.get('dateSpecificConditions'),
html,
element;
- 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 453.
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
getUi: function () {
let comparatorSelectedOptionVal = this.get('comparatorElementVal'),
dateSpecificConditions = this.get('dateSpecificConditions'),
html,
element;
- 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 453.
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
Function getAllByType
has a Cognitive Complexity of 122 (exceeds 5 allowed). Consider refactoring. Open
public static function getAllByType($tabid, $type = false, $parameters = false)
{
if (\App\Cache::has('AllLinks', 'ByType')) {
$rows = \App\Cache::get('AllLinks', 'ByType');
} else {
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
- 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 486.
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 process(App\Request $request)
{
$currentUserId = \App\User::getCurrentUserId();
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
- 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 486.
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
File Detail.php
has 984 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
File PackageImport.php
has 980 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* +**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
Similar blocks of code found in 2 locations. Consider refactoring. Open
return ['tabId'=>['Dashboard'=>1,'Home'=>3,'Contacts'=>4,'Accounts'=>6,'Leads'=>7,'Documents'=>8,'Calendar'=>9,'HelpDesk'=>13,'Products'=>14,'Faq'=>15,'Vendors'=>18,'PriceBooks'=>19,'Rss'=>24,'Campaigns'=>26,'Users'=>29,'Import'=>30,'ModTracker'=>32,'ServiceContracts'=>34,'Services'=>35,'Assets'=>37,'ModComments'=>40,'ProjectMilestone'=>41,'ProjectTask'=>42,'Project'=>43,'SMSNotifier'=>45,'OSSMail'=>48,'OSSTimeControl'=>51,'OSSMailScanner'=>53,'OSSMailView'=>54,'OSSOutsourcedServices'=>57,'OSSSoldServices'=>58,'OutsourcedProducts'=>59,'OSSEmployees'=>61,'ApiAddress'=>73,'CallHistory'=>74,'Ideas'=>75,'HolidaysEntitlement'=>78,'PaymentsIn'=>79,'PaymentsOut'=>80,'LettersIn'=>81,'LettersOut'=>82,'Announcements'=>83,'Reservations'=>84,'SQuoteEnquiries'=>85,'SSalesProcesses'=>86,'SRequirementsCards'=>87,'SCalculations'=>88,'SQuotes'=>89,'SSingleOrders'=>90,'SRecurringOrders'=>91,'Partners'=>92,'Competition'=>93,'FBookkeeping'=>94,'FInvoice'=>95,'KnowledgeBase'=>96,'IStorages'=>97,'IGRN'=>98,'FInvoiceProforma'=>99,'IGDN'=>100,'IIDN'=>101,'IGIN'=>102,'IPreOrder'=>103,'ISTDN'=>104,'ISTN'=>105,'ISTRN'=>106,'FCorectingInvoice'=>107,'IGRNC'=>108,'IGDNC'=>109,'OpenStreetMap'=>110,'Notification'=>111,'EmailTemplates'=>112,'CFixedAssets'=>113,'CInternalTickets'=>114,'FInvoiceCost'=>115,'CMileageLogbook'=>116,'SVendorEnquiries'=>117,'Chat'=>118,'MultiCompany'=>119,'PermissionInspector'=>120,'DataSetRegister'=>121,'ActivityRegister'=>122,'LocationRegister'=>123,'IncidentRegister'=>124,'AuditRegister'=>125,'RecycleBin'=>126,'Approvals'=>127,'ApprovalsRegister'=>128,'MailIntegration'=>129,'Locations'=>130,'Occurrences'=>131,'ProductCategory'=>132,'BankAccounts'=>133,'Queue'=>134,'Passwords'=>135,'SMSTemplates'=>136],'tabPresence'=>[1=>0,3=>0,4=>0,6=>0,7=>0,8=>0,9=>0,13=>0,14=>0,15=>0,18=>0,19=>0,24=>0,26=>0,29=>0,30=>0,32=>0,34=>0,35=>0,37=>0,40=>0,41=>0,42=>0,43=>0,45=>0,48=>1,51=>0,53=>0,54=>0,57=>0,58=>0,59=>0,61=>0,73=>0,74=>0,75=>0,78=>0,79=>0,80=>0,81=>0,82=>0,83=>0,84=>0,85=>0,86=>0,87=>0,88=>0,89=>0,90=>0,91=>0,92=>0,93=>0,94=>0,95=>0,96=>0,97=>0,98=>0,99=>0,100=>0,101=>0,102=>0,103=>0,104=>0,105=>0,106=>0,107=>0,108=>0,109=>0,110=>0,111=>0,112=>0,113=>0,114=>0,115=>0,116=>0,117=>0,118=>0,119=>0,120=>0,121=>0,122=>0,123=>0,124=>0,125=>0,126=>0,127=>0,128=>0,129=>0,130=>0,131=>0,132=>0,133=>0,134=>0,135=>0,136=>0],'tabOwnedby'=>[1=>1,3=>1,4=>0,6=>0,7=>0,8=>0,9=>0,13=>0,14=>0,15=>1,18=>0,19=>1,24=>1,26=>0,29=>1,30=>0,32=>0,34=>0,35=>0,37=>0,40=>0,41=>0,42=>0,43=>0,45=>0,48=>0,51=>0,53=>0,54=>0,57=>0,58=>0,59=>0,61=>0,73=>0,74=>0,75=>0,78=>0,79=>0,80=>0,81=>0,82=>0,83=>0,84=>0,85=>0,86=>0,87=>0,88=>0,89=>0,90=>0,91=>0,92=>0,93=>0,94=>0,95=>0,96=>0,97=>0,98=>0,99=>0,100=>0,101=>0,102=>0,103=>0,104=>0,105=>0,106=>0,107=>0,108=>0,109=>0,110=>0,111=>0,112=>0,113=>0,114=>0,115=>0,116=>0,117=>0,118=>0,119=>0,120=>0,121=>0,122=>0,123=>0,124=>0,125=>0,126=>0,127=>0,128=>0,129=>0,130=>0,131=>0,132=>0,133=>0,134=>0,135=>0,136=>0],'actionId'=>['Save'=>0,'SavePriceBook'=>0,'SaveVendor'=>0,'DetailViewAjax'=>1,'EditView'=>1,'PriceBookEditView'=>1,'QuickCreate'=>1,'VendorEditView'=>1,'Delete'=>2,'DeletePriceBook'=>2,'DeleteVendor'=>2,'index'=>3,'Popup'=>3,'DetailView'=>4,'PriceBookDetailView'=>4,'VendorDetailView'=>4,'Import'=>5,'Export'=>6,'CreateView'=>7,'Merge'=>8,'ConvertLead'=>9,'ModTracker'=>13,'CreateCustomFilter'=>14,'DuplicateRecord'=>15,'EditableComments'=>16,'MassEdit'=>17,'MassDelete'=>18,'MassAddComment'=>19,'MassComposeEmail'=>20,'MassSendSMS'=>21,'MassTransferOwnership'=>22,'MassMoveDocuments'=>23,'ReadRecord'=>24,'WorkflowTrigger'=>25,'Dashboard'=>26,'CreateDashboardFilter'=>27,'QuickExportToExcel'=>28,'DetailTransferOwnership'=>30,'ActivityPostponed'=>31,'ActivityCancel'=>32,'ActivityComplete'=>33,'ExportPdf'=>34,'PrintMail'=>35,'RecordMapping'=>36,'RecordMappingList'=>37,'OpenRecord'=>38,'CloseRecord'=>39,'FavoriteRecords'=>40,'WatchingRecords'=>41,'WatchingModule'=>42,'RemoveRelation'=>46,'ReceivingMailNotifications'=>47,'ReviewingUpdates'=>48,'CreateDashboardChartFilter'=>49,'ReloadRelationRecord'=>50,'TimeLineList'=>51,'MassArchived'=>52,'MassActive'=>53,'ArchiveRecord'=>54,'ActiveRecord'=>55,'MassTrash'=>56,'MoveToTrash'=>57,'RecordConventer'=>58,'AutoAssignRecord'=>59,'AssignToYourself'=>60,'RecordPdfInventory'=>61,'SetQtyProducts'=>62,'RecordCollector'=>63,'MeetingUrl'=>64,'InterestsConflictUsers'=>65,'Kanban'=>66,'CustomViewAdvCond'=>67,'RecordActivityNotifier'=>68,'WorkflowTriggerWhenRecordIsBlocked'=>69,'ServiceContractsSla'=>70,'TilesView'=>71,'LeaderCanManageGroupMembership'=>72],'actionName'=>[0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',7=>'CreateView',8=>'Merge',9=>'ConvertLead',13=>'ModTracker',14=>'CreateCustomFilter',15=>'DuplicateRecord',16=>'EditableComments',17=>'MassEdit',18=>'MassDelete',19=>'MassAddComment',20=>'MassComposeEmail',21=>'MassSendSMS',22=>'MassTransferOwnership',23=>'MassMoveDocuments',24=>'ReadRecord',25=>'WorkflowTrigger',26=>'Dashboard',27=>'CreateDashboardFilter',28=>'QuickExportToExcel',30=>'DetailTransferOwnership',31=>'ActivityPostponed',32=>'ActivityCancel',33=>'ActivityComplete',34=>'ExportPdf',35=>'PrintMail',36=>'RecordMapping',37=>'RecordMappingList',38=>'OpenRecord',39=>'CloseRecord',40=>'FavoriteRecords',41=>'WatchingRecords',42=>'WatchingModule',46=>'RemoveRelation',47=>'ReceivingMailNotifications',48=>'ReviewingUpdates',49=>'CreateDashboardChartFilter',50=>'ReloadRelationRecord',51=>'TimeLineList',52=>'MassArchived',53=>'MassActive',54=>'ArchiveRecord',55=>'ActiveRecord',56=>'MassTrash',57=>'MoveToTrash',58=>'RecordConventer',59=>'AutoAssignRecord',60=>'AssignToYourself',61=>'RecordPdfInventory',62=>'SetQtyProducts',63=>'RecordCollector',64=>'MeetingUrl',65=>'InterestsConflictUsers',66=>'Kanban',67=>'CustomViewAdvCond',68=>'RecordActivityNotifier',69=>'WorkflowTriggerWhenRecordIsBlocked',70=>'ServiceContractsSla',71=>'TilesView',72=>'LeaderCanManageGroupMembership']];
- 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 481.
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
`` has 119 functions (exceeds 20 allowed). Consider refactoring. Open
{
form: false,
discount: false,
tax: false,
inventoryContainer: false,