Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 37 | protected function buildMessage() |
|
26 | { |
||
27 | 37 | if (is_array($this->expectedType)) { |
|
28 | 5 | $this->message = sprintf( |
|
29 | 5 | '%s type must be one of the following: %s', |
|
30 | 5 | $this->getTargetNode(), |
|
31 | 5 | implode(', ', $this->expectedType) |
|
32 | 5 | ); |
|
33 | 5 | } else { |
|
34 | 32 | $this->message = sprintf( |
|
35 | 32 | '%s must be of type %s', |
|
36 | 32 | $this->getTargetNode(), |
|
37 | 32 | $this->expectedType |
|
38 | 32 | ); |
|
39 | } |
||
40 | 37 | } |
|
41 | } |
||
42 |