| 1 | <?php |
||
| 10 | class ResponseResolver |
||
| 11 | { |
||
| 12 | public static $strategies = [ |
||
| 13 | ResponseTagStrategy::class, |
||
| 14 | TransformerTagsStrategy::class, |
||
| 15 | ResponseCallStrategy::class, |
||
| 16 | ]; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var Route |
||
| 20 | */ |
||
| 21 | private $route; |
||
| 22 | |||
| 23 | public function __construct(Route $route) |
||
| 27 | |||
| 28 | private function resolve(array $tags, array $rulesToApply) |
||
| 39 | |||
| 40 | public static function getResponse($route, $tags, $rulesToApply) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param $response |
||
| 47 | * |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | private function getResponseContent($response) |
||
| 54 | } |
||
| 55 |
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.