| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 10 |
| Ratio | 100 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 27 | View Code Duplication | public function arguments_are_valid(array &$arguments) { |
| 39 | 27 | if (count($arguments) != 1) { |
|
| 40 | return false; |
||
| 41 | } |
||
| 42 | 27 | $regexp = $arguments[0]; |
|
| 43 | 27 | if (!is_string($regexp) || @preg_match("%^$regexp\$%", "") === false) { |
|
| 44 | return false; |
||
| 45 | } |
||
| 46 | 27 | return true; |
|
| 47 | } |
||
| 48 | |||
| 61 |