YetiForceCompany/YetiForceCRM

View on GitHub
modules/Users/views/YetiForce.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class '\App\YetiForce\Shop' in method 'shop'.
Open

        $this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
Severity: Minor
Found in modules/Users/views/YetiForce.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 method verify from undeclared class \App\YetiForce\Shop
Open

        $this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
Severity: Critical
Found in modules/Users/views/YetiForce.php by phan

Class extends undeclared class \App\Controller\Modal
Open

class Users_YetiForce_View extends \App\Controller\Modal
Severity: Critical
Found in modules/Users/views/YetiForce.php by phan

Reference to undeclared class \App\Controller\Modal
Open

        parent::__construct();
Severity: Critical
Found in modules/Users/views/YetiForce.php by phan

Reference to undeclared property \Users_YetiForce_View->viewer (Did you mean $viewer)
Open

        $this->viewer->assign('MODE', $request->getMode());
Severity: Minor
Found in modules/Users/views/YetiForce.php by phan

Call to undeclared method \Users_YetiForce_View::getViewer
Open

        $viewer = $this->getViewer($request);
Severity: Critical
Found in modules/Users/views/YetiForce.php by phan

Reference to undeclared property \Users_YetiForce_View->viewer (Did you mean $viewer)
Open

        $this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
Severity: Minor
Found in modules/Users/views/YetiForce.php by phan

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

class Users_YetiForce_View extends \App\Controller\Modal

The class Users_YetiForce_View is not named in CamelCase.
Open

class Users_YetiForce_View extends \App\Controller\Modal
{
    use \App\Controller\ExposeMethod;

    /** {@inheritdoc} */
Severity: Minor
Found in modules/Users/views/YetiForce.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

     * Shop modal process.

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

    public $modalId = 'YetiForceAlert';

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

    public $successBtn = '';

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

    /** {@inheritdoc} */

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

     * @param App\Request $request

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

    /** {@inheritdoc} */

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 shop(App\Request $request): void

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

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

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

        $this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));

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 $modalIcon = 'fas fa-radiation-alt';

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

    public function __construct()

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

        $this->exposeMethod('shop');

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

    public function checkPermission(App\Request $request)

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

    public $pageTitle = 'LBL_YETIFORCE_SHOP';

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

        parent::__construct();

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

     * @return void

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

        $viewer->view('Modals/YetiForceAlert.tpl', $request->getModule());

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

    public $dangerBtn = '';

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

    public $lockExit = true;

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

    use \App\Controller\ExposeMethod;

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

    {

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

    {

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

        $this->viewer->assign('MODE', $request->getMode());

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

class Users_YetiForce_View extends \App\Controller\Modal

There are no issues that match your filters.

Category
Status