1 | <?php |
||
25 | class Validator |
||
26 | { |
||
27 | /** |
||
28 | * $type. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $type; |
||
33 | |||
34 | /** |
||
35 | * $match. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $match; |
||
40 | |||
41 | /** |
||
42 | * $error. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $error; |
||
47 | |||
48 | /** |
||
49 | * Constructor. |
||
50 | * |
||
51 | * @param array|null $options |
||
52 | */ |
||
53 | public function __construct(array $options = array()) |
||
92 | |||
93 | /** |
||
94 | * check. |
||
95 | * |
||
96 | * @param string $value |
||
97 | * |
||
98 | * @return bool |
||
99 | */ |
||
100 | public function check($value) |
||
119 | |||
120 | /** |
||
121 | * getError. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getError() |
||
129 | |||
130 | /** |
||
131 | * buildValidator. |
||
132 | * |
||
133 | * @return ValidatorInterface |
||
134 | */ |
||
135 | private function buildValidator() |
||
152 | } |
||
153 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.