Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class CategoryTest extends \Codeception\Test\Unit { |
||
16 | use Specify; |
||
17 | |||
18 | public function testRules() { |
||
19 | $category = new Category; |
||
20 | expect('rules', $this->assertEquals($category->rules(), [ |
||
|
|||
21 | ['name', 'required'], |
||
22 | ['name', 'string', 'max' => 255], |
||
23 | ])); |
||
24 | } |
||
25 | |||
26 | public function testAttributeLabels() { |
||
27 | $category = new Category; |
||
28 | expect('attributeLabels', $this->assertEquals($category->attributeLabels(), [ |
||
29 | 'id' => 'ID', |
||
30 | 'name' => 'Name', |
||
31 | ])); |
||
32 | } |
||
33 | |||
34 | public function testGetCategories() { |
||
35 | expect('getCategories', $this->assertEquals(Category::getCategories(), [ |
||
36 | 1 => 'Restoration', |
||
37 | 2 => 'Forgetting Priorities', |
||
38 | 3 => 'Anxiety', |
||
39 | 4 => 'Speeding Up', |
||
40 | 5 => 'Ticked Off', |
||
41 | 6 => 'Exhausted', |
||
42 | 7 => 'Relapse/Moral Failure', |
||
43 | ])); |
||
44 | } |
||
45 | |||
46 | public function testGetCategory() { |
||
48 | } |
||
49 | } |
||
50 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.