1 | <?php |
||
8 | class OrdersTest extends MoipTestCase |
||
9 | { |
||
10 | /** |
||
11 | * Send http request. |
||
12 | * |
||
13 | * @param Orders $order |
||
14 | * @param string $body |
||
15 | * |
||
16 | * @return Orders |
||
17 | */ |
||
18 | private function executeOrder(Orders $order = null, $body = null) |
||
30 | |||
31 | /** |
||
32 | * Test creating an order. |
||
33 | */ |
||
34 | public function testCreateOrder() |
||
41 | |||
42 | /** |
||
43 | * Teste if created itens price is correct. |
||
44 | */ |
||
45 | public function testItens() |
||
52 | |||
53 | /** |
||
54 | *Test if the total is correct. |
||
55 | */ |
||
56 | public function testTotal() |
||
63 | |||
64 | /** |
||
65 | * Test if the total is equal to the expected total. |
||
66 | */ |
||
67 | public function testTotalConstant() |
||
76 | } |
||
77 |
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.