YetiForceCompany/YetiForceCRM

View on GitHub
modules/Project/summary_blocks/SumTimeProject.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Avoid using static access to class '\App\Fields\RangeTime' in method 'process'.
Open

        return \App\Fields\RangeTime::displayElapseTime($recordModel->get('sum_time'));

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

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

class SumTimeProject

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 $name = 'FL_TOTAL_TIME_H';

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

     *

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

    public $icon = '';

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

     * Process.

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

    public $sequence = 9;

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

    public $reference = 'OSSTimeControl';

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

     * @return string

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

    public $type = 'value';

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 \App\Fields\RangeTime::displayElapseTime($recordModel->get('sum_time'));

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

    {

There are no issues that match your filters.

Category
Status