Function read
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function read()
{
$defaultCharset = App\Config::main('default_charset');
$this->createTable();
- 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 getRecordDataFromXMLTemplate
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
{
$recordData = [];
$recordNum = 0;
$firstElement = '';
- 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
The class Import_XmlReader_Reader has an overall complexity of 55 which is very high. The configured complexity threshold is 50. Open
class Import_XmlReader_Reader extends Import_FileReader_Reader
{
protected $moduleName;
protected $skipField = ['assigned_user_id', 'productid'];
protected $skipRecord = 0;
- Exclude checks
Method read
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function read()
{
$defaultCharset = App\Config::main('default_charset');
$this->createTable();
Function getInventoryData
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getInventoryData(XMLReader $xmlToImport, $keyType)
{
$recordInventoryData = [];
$labels = [];
$columnsName = [];
- 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 getRecordDataFromXMLTemplate
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
{
$recordData = [];
$recordNum = 0;
$firstElement = '';
Function getRecordDataFromXML
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getRecordDataFromXML(XMLReader $xmlToImport, $keyType = 'label')
{
$recordData = [];
$recordInventoryData = [];
$isInventory = false;
- 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 getInventoryData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getInventoryData(XMLReader $xmlToImport, $keyType)
{
$recordInventoryData = [];
$labels = [];
$columnsName = [];
Function arrayCombine
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function arrayCombine($key, $value)
{
$combine = [];
$dup = [];
$countKey = \count($key);
- 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
The method read() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
public function read()
{
$defaultCharset = App\Config::main('default_charset');
$this->createTable();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method getRecordDataFromXMLTemplate() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
{
$recordData = [];
$recordNum = 0;
$firstElement = '';
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method read() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10. Open
public function read()
{
$defaultCharset = App\Config::main('default_charset');
$this->createTable();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed. Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 34 to the 15 allowed. Open
public function read()
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Avoid using undefined variables such as '$labels' which will lead to PHP notices. Open
$labels[] = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$labels' which will lead to PHP notices. Open
$recordData = $this->arrayCombine($labels, $recordData);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method getFirstRowData has a boolean flag argument $hasHeader, which is a certain sign of a Single Responsibility Principle violation. Open
public function getFirstRowData($hasHeader = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '81', column '22'). Open
$xmlToImport = new XMLReader();
- 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 '37', column '22'). Open
$xmlToImport = new XMLReader();
- 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
The method getInventoryData uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$recordInventoryData = $this->inventoryData['data'];
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getFirstRowData uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$recordData, $recordsInventoryData] = $this->getRecordDataFromXML($xmlToImport);
$recordData = ['LBL_STANDARD_FIELDS' => $recordData, 'LBL_INVENTORY_FIELDS' => $recordsInventoryData];
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Vtiger_Inventory_Model' in method 'read'. Open
$inventoryModel = Vtiger_Inventory_Model::getInstance($this->moduleName);
- 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\Purifier' in method 'read'. Open
$mappedData[$fieldName] = isset($fields[$fieldName]) && 'text' === $fields[$fieldName]->getFieldDataType() ? \App\Purifier::purifyHtml($fieldValue) : \App\Purifier::purify($fieldValue);
- 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\Purifier' in method 'getInventoryData'. Open
$label = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- 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
The method getRecordDataFromXMLTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$info['val'] = $xmlToImport->readString();
$recordData[$recordNum][$this->request->get('module')][] = $info;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Import_Module_Model' in method 'createTable'. Open
$tableName = Import_Module_Model::getDbTableName($this->user);
- 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\Purifier' in method 'getRecordDataFromXML'. Open
$labels[] = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- 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\Config' in method 'read'. Open
$defaultCharset = App\Config::main('default_charset');
- 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 'Vtiger_Module_Model' in method 'read'. Open
$moduleModel = Vtiger_Module_Model::getInstance($this->moduleName);
- 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 '\vtlib\Utils' in method 'createTable'. Open
if (!\vtlib\Utils::checkTable($tableName)) {
- 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\Purifier' in method 'read'. Open
$mappedData[$fieldName] = isset($fields[$fieldName]) && 'text' === $fields[$fieldName]->getFieldDataType() ? \App\Purifier::purifyHtml($fieldValue) : \App\Purifier::purify($fieldValue);
- 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
The method getRecordDataFromXMLTemplate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ('true' == $info['notrepeat']) {
if ('LineNumber' == $xmlToImport->localName) {
$lineProd = $xmlToImport->readString();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Define a constant instead of duplicating this literal "label" 5 times. Open
public function getRecordDataFromXML(XMLReader $xmlToImport, $keyType = 'label')
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Avoid unused local variables such as '$dataType'. Open
foreach ($fieldModel->getCustomColumn() as $columnParamsName => $dataType) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$hasHeader'. Open
public function getFirstRowData($hasHeader = true)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Reference to undeclared property \Import_XmlReader_Reader->filePath
Open
if (isset($this->filePath)) {
- Exclude checks
Call to deprecated function \Import_XmlReader_Reader::convertCharacterEncoding()
defined at /code/modules/Import/readers/FileReader.php:94
Open
$fieldValue = $this->convertCharacterEncoding($fieldValue, $this->request->get('file_encoding'), $defaultCharset);
- Exclude checks
Parameter $user
has undeclared type \App\User
(Did you mean class \Tests\App\User) Open
public function __construct(App\Request $request, App\User $user)
- Exclude checks
Reference to undeclared property \Import_XmlReader_Reader->filePath
Open
return $this->filePath;
- Exclude checks
Reference to undeclared property \Import_XmlReader_Reader->inventoryData
Open
$recordInventoryData = $this->inventoryData['data'];
- Exclude checks
Reference to undeclared property \Import_XmlReader_Reader->inventoryData
Open
$columnsName = $this->inventoryData['tags'] ?? [];
- Exclude checks
Argument 1 (keys)
is null
but \array_combine()
takes int[]|string[]
Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Reference to undeclared property \Import_XmlReader_Reader->inventoryData
Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Variable $labels
was undeclared, but array fields are being added to it. Open
$labels[] = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- Exclude checks
Invalid offset 0
of array type array{-1:array<int>}|array{}</int>
Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Call to undeclared method \Import_XmlReader_Reader::getFieldInfoByTagName
Open
$info = $this->getFieldInfoByTagName($xmlToImport->localName);
- Exclude checks
Argument 2 (values)
is null
but \array_combine()
takes array
Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Reference to undeclared property \Import_XmlReader_Reader->inventoryData
Open
$recordInventoryData = $this->inventoryData['labels'];
- Exclude checks
Avoid excessively long variable names like $inventoryFieldMapping. Keep variable name length under 20. Open
$inventoryFieldMapping = $this->request->get('inventory_field_mapping');
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $relatedInventoryField. Keep variable name length under 20. Open
protected $relatedInventoryField = [];
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Import_XmlReader_Reader extends Import_FileReader_Reader
- Exclude checks
The class Import_XmlReader_Reader is not named in CamelCase. Open
class Import_XmlReader_Reader extends Import_FileReader_Reader
{
protected $moduleName;
protected $skipField = ['assigned_user_id', 'productid'];
protected $skipRecord = 0;
- 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
protected $importedRecords = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\User $user
- 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
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getFirstRowData($hasHeader = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$xmlToImport = new XMLReader();
- 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 $moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->isTemplate()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Constructor.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct(App\Request $request, App\User $user)
- 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
return $recordData;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getFilePath()
- 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 hasHeader()
- 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
$recordData = ['LBL_STANDARD_FIELDS' => $recordData, 'LBL_INVENTORY_FIELDS' => $recordsInventoryData];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($recordData['LBL_INVENTORY_FIELDS']);
- 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 $skipField = ['assigned_user_id', 'productid'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$xmlToImport->open($this->getFilePath());
- 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
$recordData = $this->getRecordDataFromXMLTemplate($xmlToImport);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $skipRecord = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $relatedInventoryField = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct($request, $user);
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($recordsInventoryData)) {
- 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
$mappedData[$fieldName] = isset($fields[$fieldName]) && 'text' === $fields[$fieldName]->getFieldDataType() ? \App\Purifier::purifyHtml($fieldValue) : \App\Purifier::purify($fieldValue);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($fieldValue)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$allValuesEmpty = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($data as $key => $fieldValue) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\in_array($columnParamsName, $columnsName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->addInventoryToDB($inventoryMappedData, $importId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$countKey = \count($key);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!\in_array($xmlToImport->localName, ['MODULE_FIELDS', 'INVENTORY_ITEM', 'INVENTORY_ITEMS'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('label' == $keyType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$labels = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($xmlToImport->read()) {
- 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
$xmlToImport->open($this->getFilePath());
- 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
$labels[$index][] = $label;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($this->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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!\vtlib\Utils::checkTable($tableName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function reads data from file and adds to database.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($fieldModel->getCustomColumn() as $columnParamsName => $dataType) {
- 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
$recordData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[$recordData, $recordsInventoryData] = $this->getRecordDataFromXML($xmlToImport);
- 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
$dup[$key[$i]] = 1;
- 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
$recordInventoryData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (XMLReader::ELEMENT == $xmlToImport->nodeType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRecordDataFromXMLTemplate(XMLReader $xmlToImport)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->filePath;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tableName = Import_Module_Model::getDbTableName($this->user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$inventoryModel = Vtiger_Inventory_Model::getInstance($this->moduleName);
- 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
$recordInventoryData = $this->getInventoryData($xmlToImport, $keyType);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('label' === $keyType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return parent::getFilePath();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$inventoryMappedData[$index][$fieldName] = $fieldValue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($importId && $inventoryMappedData) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$combine[$key[$i]] = $value[$i];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$label = $xmlToImport->localName;
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::createTable();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function read()
- 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
$key = array_search($columnParamsName, $columnsName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (XMLReader::ELEMENT == $xmlToImport->nodeType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
continue;
- 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
$this->createTable();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[$recordData, $recordsInventoryData] = $this->getRecordDataFromXML($xmlToImport, false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleModel = Vtiger_Module_Model::getInstance($this->moduleName);
- Exclude checks
Line exceeds 120 characters; contains 197 characters Open
$mappedData[$fieldName] = isset($fields[$fieldName]) && 'text' === $fields[$fieldName]->getFieldDataType() ? \App\Purifier::purifyHtml($fieldValue) : \App\Purifier::purify($fieldValue);
- 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
if ($fieldModel) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$inventoryMappedData[$index][$columnParamsName] = $data[$key];
- 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
$recordData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$isInventory = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getInventoryData(XMLReader $xmlToImport, $keyType)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordInventoryData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($label)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$columnsName[$index][] = $xmlToImport->localName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->inventoryData = ['labels' => array_combine($labels[0], $recordInventoryData[0]), 'tags' => $columnsName[0], 'data' => $recordInventoryData];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($fieldMapping as $fieldName => $index) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldValue = $recordData[$index];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$inventoryFields = $inventoryModel->getFields();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$allValuesEmpty) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dup = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\array_key_exists($key[$i], $combine)) {
- 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
$recordNum = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$defaultCharset = App\Config::main('default_charset');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldName = array_search($key, $inventoryFieldMapping);
- 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
return !empty($this->request->get('xml_import_tpl'));
- 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
$recordInventoryData[$index][] = $xmlToImport->readString();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function createTable()
- 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
$inventoryFieldMapping = $this->request->get('inventory_field_mapping');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = $moduleModel->getFields();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->request->get('file_encoding') !== $defaultCharset) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldValue = $this->convertCharacterEncoding($fieldValue, $this->request->get('file_encoding'), $defaultCharset);
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$fieldValue = $this->convertCharacterEncoding($fieldValue, $this->request->get('file_encoding'), $defaultCharset);
- 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
for ($i = 0; $i < $countKey; ++$i) {
- 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
} elseif ($isInventory && 'INVENTORY_ITEMS' == $xmlToImport->localName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$columnsName = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$label = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- 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
$fieldModel = $inventoryFields[$fieldName];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!isset($dup[$key[$i]])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$key[$i] = $key[$i] . ' (' . ++$dup[$key[$i]] . ')';
- 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
$recordData[] = $xmlToImport->readString();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordInventoryData = $this->inventoryData['data'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $recordInventoryData;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$xmlToImport = new XMLReader();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mappedData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$allValuesEmpty = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($inventoryFieldMapping && $recordsInventoryData) {
- 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
$importId = $this->addRecordToDB($mappedData);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $combine;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRecordDataFromXML(XMLReader $xmlToImport, $keyType = 'label')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$isInventory = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($xmlToImport->read()) {
- 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
++$index;
- 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
$columnsName = $this->inventoryData['tags'] ?? [];
- 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 arrayCombine($key, $value)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$combine = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordData = $this->arrayCombine($labels, $recordData);
- 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
$index = -1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('INVENTORY_ITEM' == $xmlToImport->localName) {
- 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
$recordInventoryData = $this->inventoryData['labels'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function creates tables for import in database.
- 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
$fieldMapping = $this->request->get('field_mapping');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function isTemplate()
- 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
$labels[] = \App\Purifier::purify($xmlToImport->getAttribute('label'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return [$recordData, $recordInventoryData];
- 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
$inventoryMappedData = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($recordsInventoryData as $index => $data) {
- 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
if ($this->moduleModel->isInventory()) {
- 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
$lineProd = '';
- 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
if ($info && 'product' != $info['type']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (XMLReader::END_ELEMENT == $xmlToImport->nodeType && $xmlToImport->localName == $firstElement) {
- 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
$firstElement = '';
- 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
++$recordNum;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$info['val'] = $xmlToImport->readString();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$info = $this->getFieldInfoByTagName($xmlToImport->localName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$info['val'] = $xmlToImport->readString();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
++$recordNum;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordData[$recordNum][$this->request->get('module')]['prod_line'][$lineProd][] = $info;
- 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
if (0 == $recordNum) {
- 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
$recordData[$recordNum][$this->request->get('module')][] = $info;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lineProd = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('true' == $info['notrepeat']) {
- 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
$firstElement = $xmlToImport->localName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('LineNumber' == $xmlToImport->localName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$lineProd = $xmlToImport->readString();
- 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
return $recordData;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($xmlToImport->read()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (XMLReader::ELEMENT == $xmlToImport->nodeType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordData[$recordNum][$info['refmoule']][] = $info;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('reference' == $info['crmfieldtype']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$info['val'] = $xmlToImport->readString();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Class name "Import_XmlReader_Reader" is not in camel caps format Open
class Import_XmlReader_Reader extends Import_FileReader_Reader
- Exclude checks