YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

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

        return (int) (new \App\Db\Query())->from('u_#__squotes')

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

        return (int) (new \App\Db\Query())->from('u_#__squotes')

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

class OffersAll

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

    public $reference = 'SQuotes';

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

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_#__squotes.accountid' => $recordModel->getId()])->count(1);

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

    /**

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

            ->innerJoin('vtiger_crmentity', 'u_#__squotes.squotesid = vtiger_crmentity.crmid')

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

    public $name = 'Offers all';

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

     *

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

        return (int) (new \App\Db\Query())->from('u_#__squotes')

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

    public $sequence = 2;

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

    {

There are no issues that match your filters.

Category
Status