YetiForceCompany/YetiForceCRM

View on GitHub
modules/OSSMailScanner/scanneractions/BindPartners.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Avoid unused parameters such as '$moduleName'.
Open

    public function process(OSSMail_Mail_Model $mail, $moduleName = 'Partners')

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid excessively long class names like OSSMailScanner_BindPartners_ScannerAction. Keep class name length under 40.
Open

class OSSMailScanner_BindPartners_ScannerAction extends OSSMailScanner_EmailScannerAction_Model
{
    public function process(OSSMail_Mail_Model $mail, $moduleName = 'Partners')
    {
        return parent::process($mail, 'Partners');

LongClassName

Since: 2.9

Detects when classes or interfaces are declared with excessively long names.

Example

class ATooLongClassNameThatHintsAtADesignProblem {

}

interface ATooLongInterfaceNameThatHintsAtADesignProblem {

}

Source https://phpmd.org/rules/naming.html#longclassname

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

class OSSMailScanner_BindPartners_ScannerAction extends OSSMailScanner_EmailScannerAction_Model

The class OSSMailScanner_BindPartners_ScannerAction is not named in CamelCase.
Open

class OSSMailScanner_BindPartners_ScannerAction extends OSSMailScanner_EmailScannerAction_Model
{
    public function process(OSSMail_Mail_Model $mail, $moduleName = 'Partners')
    {
        return parent::process($mail, 'Partners');

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

    public function process(OSSMail_Mail_Model $mail, $moduleName = 'Partners')

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

        return parent::process($mail, 'Partners');

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

    }

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

    {

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

class OSSMailScanner_BindPartners_ScannerAction extends OSSMailScanner_EmailScannerAction_Model

There are no issues that match your filters.

Category
Status