YetiForceCompany/YetiForceCRM

View on GitHub
modules/Calendar/views/Reminders.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class 'Calendar_Module_Model' in method 'process'.
Open

        $viewer->assign('RECORDS', Calendar_Module_Model::getCalendarReminder());
Severity: Minor
Found in modules/Calendar/views/Reminders.php by phpmd

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

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

        $viewer->assign('PERMISSION_TO_SENDE_MAIL', \App\Mail::checkMailClient());
Severity: Minor
Found in modules/Calendar/views/Reminders.php by phpmd

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

Call to undeclared method \Vtiger_Viewer::assign
Open

        $viewer->assign('PERMISSION_TO_SENDE_MAIL', \App\Mail::checkMailClient());
Severity: Critical
Found in modules/Calendar/views/Reminders.php by phan

Call to undeclared method \Vtiger_Viewer::assign
Open

        $viewer->assign('RECORDS', Calendar_Module_Model::getCalendarReminder());
Severity: Critical
Found in modules/Calendar/views/Reminders.php by phan

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

class Calendar_Reminders_View extends Vtiger_IndexAjax_View

The class Calendar_Reminders_View is not named in CamelCase.
Open

class Calendar_Reminders_View extends Vtiger_IndexAjax_View
{
    /**
     * Process.
     *
Severity: Minor
Found in modules/Calendar/views/Reminders.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

     * @param \App\Request $request

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

    {

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

        $viewer = $this->getViewer($request);

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

        $viewer->assign('PERMISSION_TO_SENDE_MAIL', \App\Mail::checkMailClient());

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

     * 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

    public function process(App\Request $request)

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

        $viewer->view('Reminders.tpl', $request->getModule());

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

        $viewer->assign('RECORDS', Calendar_Module_Model::getCalendarReminder());

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

    }

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

class Calendar_Reminders_View extends Vtiger_IndexAjax_View

There are no issues that match your filters.

Category
Status