| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 20 | final protected function checkMockType($mock) |
|
| 35 | { |
||
| 36 | 20 | if (!$this->mockType) { |
|
| 37 | 1 | throw new NotImplementedException(); |
|
| 38 | } |
||
| 39 | |||
| 40 | 19 | if (!is_a($mock, $this->mockType)) { |
|
| 41 | 4 | throw new InvalidArgumentException( |
|
| 42 | 4 | sprintf( |
|
| 43 | 4 | 'Mock must be of type %s, %s given', |
|
| 44 | 4 | $this->mockType, |
|
| 45 | 4 | gettype($mock) |
|
| 46 | ) |
||
| 47 | ); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 |