modules/Settings/Companies/views/EmailVerificationModal.php
Avoid using static access to class '\App\Company' in method 'process'. Open
Open
}
- Read upRead up
- Exclude checks
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
Open
$this->lockExit = !App\YetiForce\Register::isPreRegistered();
- Read upRead up
- Exclude checks
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
Open
protected bool $blurBackground = true;
- Exclude checks
Avoid excessively long class names like Settings_Companies_EmailVerificationModal_View. Keep class name length under 40. Open
Open
class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
{
/**
* Registration modal event parameters.
*/
- Read upRead up
- Exclude checks
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
Open
class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
- Exclude checks
The class Settings_Companies_EmailVerificationModal_View is not named in CamelCase. Open
Open
class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
{
/**
* Registration modal event parameters.
*/
- Read upRead up
- Exclude checks
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
Open
'execution' => 'constant',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer->assign('MODULE', $request->getModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'url' => 'index.php?parent=Settings&module=Companies&view=EmailVerificationModal',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $pageTitle = 'LBL_EMAIL_VERIFICATION_MODAL_HEADER';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getModalScripts(App\Request $request): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'name' => 'EmailVerification',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'type' => 'modal',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Registration modal event parameters.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $showFooter = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function preProcessAjax(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public const MODAL_EVENT = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'modules.Settings.Companies.resources.EmailVerificationModal',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'priority' => 10,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $modalSize = 'modal-xl';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $successBtnIcon = 'fas fa-paper-plane';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->lockExit = !App\YetiForce\Register::isPreRegistered();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function process(App\Request $request): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $successBtn = 'LBL_SEND';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $modalIcon = 'fas fa-globe';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected bool $blurBackground = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
parent::preProcessAjax($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $lockExit = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected bool $draggable = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer->assign('EMAIL', \App\Company::getCompany()['email'] ?? '');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer->view('EmailVerificationModal.tpl', $request->getModule(false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
]));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
];
- Exclude checks
Class name "Settings_Companies_EmailVerificationModal_View" is not in camel caps format Open
Open
class Settings_Companies_EmailVerificationModal_View extends \App\Controller\ModalSettings
- Exclude checks