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