| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function assign($externalData) |
||
| 11 | { |
||
| 12 | $order = new \Iris\Transfer\Catalog\ConfigCollection(); |
||
| 13 | $config = [ |
||
|
|
|||
| 14 | 'sku' => $c['sku'], |
||
| 15 | 'variation' => $c['variation'], |
||
| 16 | 'brand' => $c['brand'], |
||
| 17 | 'color' => $c['color'], |
||
| 18 | 'gender' => $c['gender'], |
||
| 19 | 'color_family' => $c['color_family'], |
||
| 20 | 'box_height' => $c['box_height'], |
||
| 21 | 'box_width' => $c['box_width'], |
||
| 22 | 'box_length' => $c['box_length'], |
||
| 23 | 'weight' => $c['weight'], |
||
| 24 | 'color_name_brand' => $c['color_name_brand'], |
||
| 25 | 'quantity' => $c['quantity'], |
||
| 26 | 'barcode_ean' => $c['barcode_ean'] |
||
| 27 | ]; |
||
| 28 | |||
| 29 | return $order; |
||
| 30 | } |
||
| 31 | |||
| 48 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.