1 | <?php namespace SOSTheBlack\Moip\Controllers; |
||
10 | class MoipController extends BaseController |
||
11 | { |
||
12 | /** |
||
13 | * data of configuration of the MoIP |
||
14 | * |
||
15 | * @var [] |
||
16 | **/ |
||
17 | |||
18 | private $moip; |
||
19 | |||
20 | /** |
||
21 | * array |
||
22 | * |
||
23 | * @var [] |
||
24 | **/ |
||
25 | |||
26 | private $data = [ |
||
27 | "Forma" => "", |
||
28 | "Instituicao" => "", |
||
29 | "Parcelas" => "", |
||
30 | "CartaoCredito" => [ |
||
31 | "Numero" => "", |
||
32 | "Expiracao" => "", |
||
33 | "Cofre" => "", |
||
34 | "CodigoSeguranca"=> "", |
||
35 | "Portador" => [ |
||
36 | "Nome" => "", |
||
37 | "DataNascimento"=> "", |
||
38 | "Telefone" => "", |
||
39 | "Identidade" => "" |
||
40 | ] |
||
41 | ] |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * callback do js de pagamento do moip |
||
46 | * |
||
47 | * @var array |
||
48 | **/ |
||
49 | protected $response; |
||
50 | |||
51 | /** |
||
52 | * response |
||
53 | * Recebe o callback do js de pagamento do moip |
||
54 | * e grava os dados em uma session |
||
55 | * |
||
56 | * @return type |
||
57 | */ |
||
58 | public function response() |
||
64 | |||
65 | /** |
||
66 | * initialize |
||
67 | * |
||
68 | * @param string|null $token |
||
69 | * @return void |
||
70 | */ |
||
71 | private function initialize(array $data, $token) |
||
81 | |||
82 | /** |
||
83 | * token |
||
84 | * Define o token que será pago |
||
85 | * |
||
86 | * @param string $token |
||
87 | * @return string |
||
88 | */ |
||
89 | private function token($token) |
||
93 | |||
94 | /** |
||
95 | * transparent |
||
96 | * |
||
97 | * @param array $data |
||
98 | * @param string $token |
||
99 | * @return Illuminate\View\Factory |
||
100 | */ |
||
101 | public function transparent(array $data, $token = null) |
||
106 | |||
107 | /** |
||
108 | * environment |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | private function environment() |
||
124 | } |
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.