Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class HelpersTest extends TestCase |
||
8 | { |
||
9 | /** |
||
10 | * Includes the functions file manually. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function setUp() |
||
15 | { |
||
16 | require_once __DIR__ . '/../app/helpers.php'; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Tests the view importer. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | public function testView(): void |
||
25 | { |
||
26 | $hash = bin2hex(openssl_random_pseudo_bytes(16)); |
||
27 | $value = view('/../tests/samples/view.php', ['hash' => $hash]); |
||
|
|||
28 | $this->assertEquals('Test value: ' . $hash, $value); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * tests the configuration importer. |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function testConfig(): void |
||
41 | } |
||
42 | } |
||
43 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.