modules/Accounts/summary_blocks/CalculationsAll.php
Missing class import via use statement (line '18', column '17'). Open
Open
$count = (new \App\Db\Query())->from('u_#__scalculations')
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Call to undeclared method \App\Db\Query::from
Open
Open
$count = (new \App\Db\Query())->from('u_#__scalculations')
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class CalculationsAll
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$count = (new \App\Db\Query())->from('u_#__scalculations')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function process(Vtiger_Record_Model $recordModel)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
->innerJoin('vtiger_crmentity', 'u_#__scalculations.scalculationsid = vtiger_crmentity.crmid')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $name = 'Calculations all';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Process function.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return (int) $count;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
->where(['deleted' => 0, 'u_#__scalculations.accountid' => $recordModel->getId()])->count(1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return int
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $reference = 'SCalculations';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param Vtiger_Record_Model $recordModel
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $sequence = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks