Method runConvert
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function runConvert($Row)
{
$Result = array();
foreach ($Row as $Part) {
File ImportGateway.php
has 332 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Import Fakturierung. Reihenfolge der Felder aus der xlsx-Datei *.xlsx
* wird Dynamisch ausgelesen (Erfolgt in Control)
*/
Function runConvert
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function runConvert($Row)
{
$Result = array();
foreach ($Row as $Part) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($File, ImportControl $Control, $Item = '')
{
$this->loadFile($File);
$this->ItemName = $Item;
Function getPerson
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getPerson($FirstName, $LastName, $Birthday = '', TblPerson $tblPersonStudent = null)
{
$tblPersonList = array();
if ($Birthday){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sanitizeIBANFrontend
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function sanitizeIBANFrontend($Value)
{
$iban = strtoupper(str_replace(' ', '', $Value));
// Todo Wie gehen wir mit fehlerwerten um?
if (preg_match('!(DE)([0-9]){20}!is', $iban, $Match)){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sanitizeDebtorNumber
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function sanitizeDebtorNumber($Value)
{
if(($Setting = Setting::useService()->getSettingByIdentifier(TblSetting::IDENT_DEBTOR_NUMBER_COUNT))){
if(strlen($Value) > $Setting->getValue()){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"