YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Companies/views/EmailVerificationModal.php

Summary

Maintainability
A
0 mins
Test Coverage

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

}

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\YetiForce\Register' in method 'preProcessAjax'.
Open

        $this->lockExit = !App\YetiForce\Register::isPreRegistered();

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

syntax error, unexpected 'bool' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    protected bool $blurBackground = true;

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

class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
{
    /**
     * Registration modal event parameters.
     */

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 Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings

The class Settings_Companies_EmailVerificationModal_View is not named in CamelCase.
Open

class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
{
    /**
     * Registration modal event parameters.
     */

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

        'execution' => 'constant',

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

        $viewer->assign('MODULE', $request->getModule());

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

    {

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

        'url' => 'index.php?parent=Settings&module=Companies&view=EmailVerificationModal',

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

    public $pageTitle = 'LBL_EMAIL_VERIFICATION_MODAL_HEADER';

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 function getModalScripts(App\Request $request): array

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

        'name' => 'EmailVerification',

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

        'type' => 'modal',

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

    {

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

     * Registration modal event parameters.

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 $showFooter = false;

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 function preProcessAjax(App\Request $request)

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

    public const MODAL_EVENT = [

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

            'modules.Settings.Companies.resources.EmailVerificationModal',

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

        'priority' => 10,

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

    public $modalSize = 'modal-xl';

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

    public $successBtnIcon = 'fas fa-paper-plane';

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

        $this->lockExit = !App\YetiForce\Register::isPreRegistered();

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

    public function process(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

    /**

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 $successBtn = 'LBL_SEND';

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

    /** {@inheritdoc} */

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

    public $modalIcon = 'fas fa-globe';

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

        return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([

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

    protected bool $blurBackground = true;

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

        parent::preProcessAjax($request);

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

    /** {@inheritdoc} */

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

    protected bool $draggable = false;

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

        $viewer->assign('EMAIL', \App\Company::getCompany()['email'] ?? '');

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 = $this->getViewer($request);

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

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

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 "Settings_Companies_EmailVerificationModal_View" is not in camel caps format
Open

class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings

There are no issues that match your filters.

Category
Status