Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 13 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | View Code Duplication | protected function getCredentials($transaction = true) |
|
22 | { |
||
23 | $data = [ |
||
24 | 'data' => $transaction ? $this->getTransaction() : [], |
||
25 | 'status_url' => 'foo', |
||
26 | 'account' => 'payubiz', |
||
27 | 'model' => ['id' => 1, 'class' => 'baz'], |
||
28 | ]; |
||
29 | |||
30 | Session::put('tzsk_payu_data', $data); |
||
31 | |||
32 | return $data; |
||
33 | } |
||
34 | |||
47 |
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.