Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 1 | public function getMessages() |
|
36 | { |
||
37 | 1 | $validExtensions = $this->validExtensions; |
|
38 | 1 | $last = array_pop($validExtensions); |
|
39 | 1 | $extensions = 'The file must be a ' . $last . ' file.'; |
|
40 | |||
41 | 1 | if (count($validExtensions) > 0) { |
|
42 | 1 | $extensions = implode(', ', $validExtensions); |
|
43 | 1 | $extensions .= ' or ' . $last; |
|
44 | 1 | $extensions = 'The file must be either a ' . $extensions . ' file.'; |
|
45 | } |
||
46 | |||
47 | 1 | return [$extensions]; |
|
48 | } |
||
49 | } |