app/Integrations/Magento/Synchronizer/Maps/Product.php
Missing class import via use statement (line '73', column '26'). Open
Open
$this->category = new \App\Integrations\Magento\Synchronizer\Category($this->synchronizer->controller);
- 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
Cannot assign void return value Open
Open
$crmId = $this->category->createCategory($category);
- Exclude checks
Assigning false
to property but \App\Integrations\Magento\Synchronizer\Maps\Product->category
is \App\Integrations\Magento\Synchronizer\Category
Open
Open
public $category = false;
- 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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Discontinued value map.
- 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
if (false === $this->category) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$parsedCategories = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$parsedCategories[] = $crmId;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $parsedCategories;
- Exclude checks
Line exceeds 120 characters; contains 182 characters Open
Open
* The file is part of the paid functionality. Using the file is allowed only after purchasing a subscription. File modification allowed only with the consent of the system producer.
- 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
* @var array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static $additionalFieldsCrm = [
- 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
'discontinued' => 'status',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'ean' => 'sku',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'categories' => 'custom_attributes|category_ids',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'unit_price' => '0',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static $fieldsType = [
- 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 $category = 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
$categories = $this->getCustomAttributeValue('category_ids') ?: [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static $fieldsDefaultValue = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Category model.
- 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 getCrmCategories(): array
- 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
if (empty($crmId)) {
- 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
'2' => '0',
- 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
'purchase' => '0',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'discontinued' => 'map',
- 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
public static $discontinued = [
- 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 static $mappedFields = [
- 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
foreach ($categories as $category) {
- 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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->category = new \App\Integrations\Magento\Synchronizer\Category($this->synchronizer->controller);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var \App\Integrations\Magento\Synchronizer\Category
- 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
$crmId = $this->category->createCategory($category);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'productname' => 'name',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'description' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'1' => '1',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Method to get parsed categories ids.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$crmId = $this->category->getCrmId($category);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'description' => 'custom_attributes|description',
- 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
];
- Exclude checks