Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function __invoke(GetEventsQuery $query) : array |
||
31 | { |
||
32 | $page = $query->page(); |
||
33 | $pageSize = $query->pageSize(); |
||
34 | $since = $query->since(); |
||
|
|||
35 | |||
36 | $offset = ($page - 1) * $pageSize; |
||
37 | |||
38 | return ['data' => ['lala' => 'lalala']]; |
||
39 | |||
40 | $events = $this->eventStore->eventsSince($since, $offset, $pageSize); |
||
41 | |||
42 | return $this->response->build($events, $page, $pageSize); |
||
43 | } |
||
44 | } |
||
45 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.