| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function assign(array $externalData) |
||
| 11 | { |
||
| 12 | $priceCollection = new \Iris\Transfer\Catalog\ConfigCollection; |
||
| 13 | foreach ($externalData as $data) { |
||
| 14 | $price = new \Iris\Transfer\Catalog\Config([ |
||
|
|
|||
| 15 | 'sku' => $data['sku'], |
||
| 16 | 'price' => $data['price'], |
||
| 17 | 'special_price' => $data['special_price'], |
||
| 18 | 'specialFromDate' => $data['special_from_date'], |
||
| 19 | 'specialToDate' => $data['special_to_date'] |
||
| 20 | ]); |
||
| 21 | } |
||
| 22 | |||
| 23 | return $priceCollection; |
||
| 24 | } |
||
| 25 | |||
| 46 |
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.