YetiForceCompany/YetiForceCRM

View on GitHub
user_privileges/tabdata.php

Summary

Maintainability
D
2 days
Test Coverage
A
100%

Define a constant instead of duplicating this literal "Dashboard" 3 times.
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']];
Severity: Critical
Found in user_privileges/tabdata.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Import" 3 times.
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']];
Severity: Critical
Found in user_privileges/tabdata.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "ModTracker" 3 times.
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']];
Severity: Critical
Found in user_privileges/tabdata.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

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']];
Severity: Major
Found in user_privileges/tabdata.php and 1 other location - About 2 days to fix
user_privileges/tabdata.php on lines 2..2

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

Further Reading

Expected 1 blank line at end of file; 2 found
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']];
Severity: Minor
Found in user_privileges/tabdata.php by phpcodesniffer

Line exceeds 120 characters; contains 623 characters
Open

<?php $tab_seq_array=[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];
Severity: Minor
Found in user_privileges/tabdata.php by phpcodesniffer

Line exceeds 120 characters; contains 5961 characters
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']];
Severity: Minor
Found in user_privileges/tabdata.php by phpcodesniffer

There are no issues that match your filters.

Category
Status