Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 9 |
Lines | 22 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
63 | View Code Duplication | public function itReturnsASingleUser() |
|
64 | { |
||
65 | $this->bunqClient->get('/v1/user/1')->willReturn( |
||
66 | [ |
||
67 | 'Response' => [ |
||
68 | [ |
||
69 | 'UserCompany' => [ |
||
70 | 'id' => 1, |
||
71 | ], |
||
72 | ], |
||
73 | ], |
||
74 | ] |
||
75 | ); |
||
76 | |||
77 | $result = $this->resource->getUser(1); |
||
78 | |||
79 | $expectedResult = [ |
||
80 | 'id' => 1, |
||
81 | ]; |
||
82 | |||
83 | $this->assertEquals($expectedResult, $result); |
||
84 | } |
||
85 | } |
||
87 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: