YetiForceCompany/YetiForceCRM

View on GitHub
modules/Accounts/summary_blocks/CalculationsAll.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Missing class import via use statement (line '18', column '17').
Open

        $count = (new \App\Db\Query())->from('u_#__scalculations')

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

        $count = (new \App\Db\Query())->from('u_#__scalculations')

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class CalculationsAll

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $count = (new \App\Db\Query())->from('u_#__scalculations')

Spaces must be used to indent lines; tabs are not allowed
Open

    public function process(Vtiger_Record_Model $recordModel)

Spaces must be used to indent lines; tabs are not allowed
Open

            ->innerJoin('vtiger_crmentity', 'u_#__scalculations.scalculationsid = vtiger_crmentity.crmid')

Spaces must be used to indent lines; tabs are not allowed
Open

    public $name = 'Calculations all';

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     * Process function.

Spaces must be used to indent lines; tabs are not allowed
Open

        return (int) $count;

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

            ->where(['deleted' => 0, 'u_#__scalculations.accountid' => $recordModel->getId()])->count(1);

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return int

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public $reference = 'SCalculations';

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param Vtiger_Record_Model $recordModel

Spaces must be used to indent lines; tabs are not allowed
Open

    public $sequence = 0;

Spaces must be used to indent lines; tabs are not allowed
Open

     */

There are no issues that match your filters.

Category
Status