| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class ProductBulkLoader extends BulkLoader |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The default behaviour for creating relations |
||
| 12 | */ |
||
| 13 | protected bool $relationCreateDefault = false; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Specify a colsure to be run on every imported record. |
||
| 17 | */ |
||
| 18 | public $recordCallback = 'setOtherProperties'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Column Map |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | public $columnMap = [ |
||
| 25 | 'Guid' => 'Guid', |
||
| 26 | 'ProductCode' => 'InternalItemID', |
||
| 27 | 'ProductDescription' => 'Title', |
||
| 28 | 'ProductGroup' => 'Parent', |
||
| 29 | 'DefaultSellPrice' => 'BasePrice', |
||
| 30 | 'Width' => 'Width', |
||
| 31 | 'Height' => 'Height', |
||
| 32 | 'Depth' => 'Depth' |
||
| 33 | ]; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Keys that need to be unique |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | public $duplicateChecks = [ |
||
| 40 | 'Guid', 'InternalItemID' |
||
| 41 | ]; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Specify a closure to be run on every imported record to set other records |
||
| 45 | * @param Product $product The placeholder |
||
| 46 | * @param array $record A row from the external API |
||
| 47 | */ |
||
| 48 | public function setOtherProperties(Product &$product, array $record): void |
||
| 55 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths