app/Controller/Components/View/YetiForceDetailModal.php
Avoid using static access to class '\App\Version' in method 'getPageTitle'. Open
Open
$version = \App\User::getCurrentUserModel()->isAdmin() ? 'v' . \App\Version::get() : '';
- 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\Language' in method 'getPageTitle'. Open
Open
$titleModal = \App\Language::translate('LBL_YETIFORCE_CRM_INFO');
- 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 undeclared method \App\Controller\Components\View\YetiForceDetailModal::getViewer
Open
Open
$viewer = $this->getViewer($request);
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
Open
$version = \App\User::getCurrentUserModel()->isAdmin() ? 'v' . \App\Version::get() : '';
- Exclude checks
Class extends undeclared class \App\Controller\Modal
Open
Open
class YetiForceDetailModal extends \App\Controller\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
}
- 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
return 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
public function getPageTitle(\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
return "YetiForceCRM {$version} - {$titleModal}";
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function process(\App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$titleModal = \App\Language::translate('LBL_YETIFORCE_CRM_INFO');
- 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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$version = \App\User::getCurrentUserModel()->isAdmin() ? 'v' . \App\Version::get() : '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$viewer->view('YetiForceDetailModal.tpl', $request->getModule());
- 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
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $dangerBtn = 'LBL_CLOSE';
- 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
{
- Exclude checks