Missing class import via use statement (line '38', column '14'). Open
throw new \App\Exceptions\NoPermitted('ERR_ILLEGAL_VALUE');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '28', column '14'). Open
throw new \App\Exceptions\NoPermitted('ERR_FILE_EMPTY_NAME');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '34', column '14'). Open
throw new \App\Exceptions\NoPermitted('ERR_ILLEGAL_VALUE');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\App\Utils\Backup' in method 'process'. Open
if (!\in_array($extension, \App\Utils\Backup::getAllowedExtension())) {
- 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\Fields\File' in method 'process'. Open
if (!App\Fields\File::isAllowedFileDirectory($filePath)) {
- 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\Utils\Backup' in method 'process'. Open
$filePath = \App\Utils\Backup::getBackupCatalogPath() . DIRECTORY_SEPARATOR . $requestFilePath;
- 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
Reference to static property rewrite
from undeclared class \CsrfMagic\Csrf
Open
\CsrfMagic\Csrf::$rewrite = false;
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_Backup_DownloadFile_Action extends Settings_Vtiger_Index_Action
- Exclude checks
The class Settings_Backup_DownloadFile_Action is not named in CamelCase. Open
class Settings_Backup_DownloadFile_Action extends Settings_Vtiger_Index_Action
{
/** {@inheritdoc} */
public function __construct()
{
- 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
$extension = strtolower(array_pop($extension));
- 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 __construct()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!\in_array($extension, \App\Utils\Backup::getAllowedExtension())) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($request->isEmpty('file')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$extension = explode('.', $requestFilePath);
- 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
$requestFilePath = $request->getByType('file', \App\Purifier::PATH);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\CsrfMagic\Csrf::$rewrite = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('content-description: File Transfer');
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('content-disposition: attachment; filename=' . basename($filePath));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\NoPermitted('ERR_FILE_EMPTY_NAME');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
ob_implicit_flush();
- 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
throw new \App\Exceptions\NoPermitted('ERR_ILLEGAL_VALUE');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\NoPermitted('ERR_ILLEGAL_VALUE');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('pragma: private');
- 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
header('content-type: application/octet-stream');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('content-transfer-encoding: binary');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filePath = \App\Utils\Backup::getBackupCatalogPath() . DIRECTORY_SEPARATOR . $requestFilePath;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('accept-ranges: bytes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
readfile($filePath);
- 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
header('content-length: ' . filesize($filePath));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('cache-control: no-cache, must-revalidate');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!App\Fields\File::isAllowedFileDirectory($filePath)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
header('expires: Mon, 26 Jul 1997 05:00:00 GMT');
- Exclude checks
Class name "Settings_Backup_DownloadFile_Action" is not in camel caps format Open
class Settings_Backup_DownloadFile_Action extends Settings_Vtiger_Index_Action
- Exclude checks