modules/Vtiger/handlers/AutoFillIban.php
Missing class import via use statement (line '28', column '22'). Open
Open
$ibanField = new \App\Fields\Iban();
- 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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class Vtiger_AutoFillIban_Handler
- Exclude checks
The class Vtiger_AutoFillIban_Handler is not named in CamelCase. Open
Open
class Vtiger_AutoFillIban_Handler
{
/**
* EntityBeforeSave function.
*
- 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
Line exceeds 120 characters; contains 150 characters Open
Open
$recordModel->set($field->getName(), $ibanValue)->setDataForSave([$field->getTableName() => [$field->getColumnName() => $ibanValue]]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$recordModel = $eventHandler->getRecordModel();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$fieldParams = $field->getFieldParams();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ($recordModel->getModule()->getFieldsByType('iban', true) as $field) {
- 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 entityBeforeSave(App\EventHandler $eventHandler): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (!$field->hasDefaultValue() && $recordModel->isEmpty($field->getName())) {
- 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
* EntityBeforeSave function.
- 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
$ibanField = new \App\Fields\Iban();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$recordModel->set($field->getName(), $ibanValue)->setDataForSave([$field->getTableName() => [$field->getColumnName() => $ibanValue]]);
- 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
* @param App\EventHandler $eventHandler
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$ibanValue = $ibanField->getIbanValue($fieldParams, $recordModel);
- Exclude checks
Class name "Vtiger_AutoFillIban_Handler" is not in camel caps format Open
Open
class Vtiger_AutoFillIban_Handler
- Exclude checks