modules/Settings/Companies/actions/CheckStatus.php
Missing class import via use statement (line '31', column '15'). Open
Open
throw new \App\Exceptions\AppException($error);
- 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 '24'). Open
Open
$registration = new \App\YetiForce\Register();
- 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 '39', column '19'). Open
Open
$response = new Vtiger_Response();
- 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 assigning values to variables in if clauses and the like (line '30', column '8'). Open
Open
public function process(App\Request $request): void
{
try {
$message = '';
$responseType = 'success';
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Call to method __construct
from undeclared class \App\YetiForce\Register
Open
Open
$registration = new \App\YetiForce\Register();
- Exclude checks
Call to method getError
from undeclared class \App\YetiForce\Register
Open
Open
if ($error = $registration->getError()) {
- Exclude checks
Call to method check
from undeclared class \App\YetiForce\Register
Open
Open
$result = $registration->check();
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class Settings_Companies_CheckStatus_Action extends Settings_Vtiger_Basic_Action
- Exclude checks
The class Settings_Companies_CheckStatus_Action is not named in CamelCase. Open
Open
class Settings_Companies_CheckStatus_Action extends Settings_Vtiger_Basic_Action
{
/**
* Check registration status.
*
- 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
*
- 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
$result = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$message = $e->getDisplayMessage();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$message = '';
- 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
$response->emit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$responseType = 'success';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'success' => $result ?? 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
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
if ($error = $registration->getError()) {
- 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
} catch (\App\Exceptions\AppException $e) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Check registration status.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
throw new \App\Exceptions\AppException($error);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'type' => $responseType
- 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 = new \App\YetiForce\Register();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$responseType = 'error';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$response->setResult([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
try {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$result = $registration->check();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$response = new Vtiger_Response();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'message' => $message ?? '',
- Exclude checks
Class name "Settings_Companies_CheckStatus_Action" is not in camel caps format Open
Open
class Settings_Companies_CheckStatus_Action extends Settings_Vtiger_Basic_Action
- Exclude checks