1 | <?php |
||
15 | class OroContext implements KernelAwareContext |
||
16 | { |
||
17 | use KernelDictionary; |
||
18 | |||
19 | /** Default WSSE credentials */ |
||
20 | const USER_NAME = 'admin'; |
||
21 | const USER_PASSWORD = 'admin_api_key'; |
||
22 | |||
23 | /** |
||
24 | * @BeforeScenario @dbIsolation |
||
25 | */ |
||
26 | public function startTransaction() |
||
32 | |||
33 | /** |
||
34 | * @AfterScenario @dbIsolation |
||
35 | */ |
||
36 | public function rollbackTransaction() |
||
42 | |||
43 | /** |
||
44 | * @BeforeScenario @dbIsolation&&@dbReindex |
||
45 | */ |
||
46 | public function reindex() |
||
53 | |||
54 | /** |
||
55 | * @BeforeScenario @wsse |
||
56 | */ |
||
57 | public function setWsseHeader() |
||
63 | |||
64 | /** |
||
65 | * Returns the test client. |
||
66 | * |
||
67 | * @return Client |
||
68 | */ |
||
69 | protected function getClient() |
||
79 | |||
80 | /** |
||
81 | * Generates WSSE Auth header. |
||
82 | * |
||
83 | * {@link \Oro\Bundle\TestFrameworkBundle\Test\WebTestCase} |
||
84 | * |
||
85 | * @param string $userName |
||
86 | * @param string $userPassword |
||
87 | * @param string|null $nonce |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | private function generateWsseAuthHeader( |
||
116 | } |
||
117 |
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.