@@ 115-122 (lines=8) @@ | ||
112 | * @return bool |
|
113 | * @throws EntityFieldsException |
|
114 | */ |
|
115 | private static function validateString($key, $value) |
|
116 | { |
|
117 | if (!is_string($value) && !is_numeric($value)) { |
|
118 | throw new EntityFieldsException("The field \"$key\" must be string"); |
|
119 | } |
|
120 | ||
121 | return true; |
|
122 | } |
|
123 | ||
124 | /** @noinspection PhpUnusedPrivateMethodInspection */ |
|
125 | /** |
|
@@ 165-172 (lines=8) @@ | ||
162 | * @return bool |
|
163 | * @throws EntityFieldsException |
|
164 | */ |
|
165 | private static function validateArraystring($key, $value) |
|
166 | { |
|
167 | if ((!is_array($value)) && (!is_string($value) && !is_numeric($value))) { |
|
168 | throw new EntityFieldsException("The field \"$key\" must be an array or string"); |
|
169 | } |
|
170 | ||
171 | return true; |
|
172 | } |
|
173 | } |