modules/Users/views/YetiForce.php
Avoid using static access to class '\App\YetiForce\Shop' in method 'shop'. Open
Open
$this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
- 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
Call to method verify
from undeclared class \App\YetiForce\Shop
Open
Open
$this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
- Exclude checks
Class extends undeclared class \App\Controller\Modal
Open
Open
class Users_YetiForce_View extends \App\Controller\Modal
- Exclude checks
Reference to undeclared class \App\Controller\Modal
Open
Open
parent::__construct();
- Exclude checks
Reference to undeclared property \Users_YetiForce_View->viewer
(Did you mean $viewer) Open
Open
$this->viewer->assign('MODE', $request->getMode());
- Exclude checks
Call to undeclared method \Users_YetiForce_View::getViewer
Open
Open
$viewer = $this->getViewer($request);
- Exclude checks
Reference to undeclared property \Users_YetiForce_View->viewer
(Did you mean $viewer) Open
Open
$this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class Users_YetiForce_View extends \App\Controller\Modal
- Exclude checks
The class Users_YetiForce_View is not named in CamelCase. Open
Open
class Users_YetiForce_View extends \App\Controller\Modal
{
use \App\Controller\ExposeMethod;
/** {@inheritdoc} */
- 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
* Shop modal process.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $modalId = 'YetiForceAlert';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $successBtn = '';
- 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
* @param App\Request $request
- 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
public function shop(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
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->viewer->assign('PRODUCTS', \App\YetiForce\Shop::verify(true));
- 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
public $modalIcon = 'fas fa-radiation-alt';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function __construct()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->exposeMethod('shop');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function checkPermission(App\Request $request)
- 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 $pageTitle = 'LBL_YETIFORCE_SHOP';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
parent::__construct();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return void
- 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
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer->view('Modals/YetiForceAlert.tpl', $request->getModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $dangerBtn = '';
- 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
}
- 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
use \App\Controller\ExposeMethod;
- 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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->viewer->assign('MODE', $request->getMode());
- Exclude checks
Class name "Users_YetiForce_View" is not in camel caps format Open
Open
class Users_YetiForce_View extends \App\Controller\Modal
- Exclude checks