| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 8 |
| Lines | 20 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 65 | View Code Duplication | public function itReturnsASingleCard() |
|
| 66 | { |
||
| 67 | $this->bunqClient->get('/v1/user/1/card/1')->willReturn( |
||
| 68 | [ |
||
| 69 | 'Response' => [ |
||
| 70 | [ |
||
| 71 | 'id' => 1, |
||
| 72 | ], |
||
| 73 | ], |
||
| 74 | ] |
||
| 75 | ); |
||
| 76 | |||
| 77 | $result = $this->resource->getCard(1, 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: