Avoid using static access to class '\App\Layout\Media' in method 'process'. Open
$viewer->assign('IMAGES', \App\Layout\Media::getImages());
- 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 '\Settings_Vtiger_Module_Model' in method 'process'. Open
$moduleModel = \Settings_Vtiger_Module_Model::getInstance('Settings:Media');
- 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\Layout\Icon' in method 'process'. Open
$viewer->assign('ICONS', \App\Layout\Icon::getIcons());
- 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\Security\AdminAccess' in method 'process'. Open
if (\App\Security\AdminAccess::isPermitted('Media')) {
- 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
Class extends undeclared class \App\Controller\Modal
Open
class MediaModal extends \App\Controller\Modal
- Exclude checks
Call to undeclared method \Settings_Vtiger_Module_Model::getFieldInstanceByName
Open
$fieldModel = $moduleModel->getFieldInstanceByName('image');
- Exclude checks
Call to undeclared method \App\Controller\Components\View\MediaModal::getViewer
Open
$viewer = $this->getViewer($request);
- Exclude checks
Reference to undeclared class \App\Controller\Modal
Open
return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Call to undeclared method \App\Controller\Components\View\MediaModal::checkAndConvertJsScripts
Open
return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function checkPermission(\App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $modalSize = 'c-modal-xxl';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('IMAGES', \App\Layout\Media::getImages());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\App\Security\AdminAccess::isPermitted('Media')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function process(\App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $pageTitle = 'LBL_MEDIA';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ICONS', \App\Layout\Icon::getIcons());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('PAGE_LIMT', 100);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $modalIcon = 'fas fa-icons';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleModel = \Settings_Vtiger_Module_Model::getInstance('Settings:Media');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('FIELD_MODEL', $fieldModel);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldModel = $moduleModel->getFieldInstanceByName('image');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $successBtn = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getModalScripts(\App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'components.MediaModal',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('MediaModal.tpl', $request->getModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks