YetiForceCompany/YetiForceCRM

View on GitHub
modules/Services/models/Record.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Call to undeclared method \App\Db::createCommand
Open

        \App\Db::getInstance()->createCommand()->delete('vtiger_seproductsrel', ['or', ['productid' => $this->getId()], ['crmid' => $this->getId()]])->execute();
Severity: Critical
Found in modules/Services/models/Record.php by phan

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

class Services_Record_Model extends Products_Record_Model

The class Services_Record_Model is not named in CamelCase.
Open

class Services_Record_Model extends Products_Record_Model
{
    /** {@inheritdoc} */
    public function delete()
    {
Severity: Minor
Found in modules/Services/models/Record.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

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

        \App\Db::getInstance()->createCommand()->delete('vtiger_seproductsrel', ['or', ['productid' => $this->getId()], ['crmid' => $this->getId()]])->execute();

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

    public function delete()

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

    {

Line exceeds 120 characters; contains 161 characters
Open

        \App\Db::getInstance()->createCommand()->delete('vtiger_seproductsrel', ['or', ['productid' => $this->getId()], ['crmid' => $this->getId()]])->execute();

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

    }

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

    /** {@inheritdoc} */

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

        parent::delete();

Class name "Services_Record_Model" is not in camel caps format
Open

class Services_Record_Model extends Products_Record_Model

There are no issues that match your filters.

Category
Status