| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public static function resolveParams(Container $container, $params) |
||
| 15 | { |
||
| 16 | $resolvedParams = array(); |
||
| 17 | foreach($params as $key=>$param) { |
||
| 18 | $resolvedParam = null; |
||
|
|
|||
| 19 | if (is_array($param)) { |
||
| 20 | $resolvedParam = self::resolveParams($container, $param); |
||
| 21 | } else if (is_string($param)){ |
||
| 22 | $resolvedParam = $container->resolve($param); |
||
| 23 | } else { |
||
| 24 | $resolvedParam = $param; |
||
| 25 | } |
||
| 26 | $resolvedParams[$key] = $resolvedParam; |
||
| 27 | } |
||
| 28 | return $resolvedParams; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
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.