@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // Does doc has a array that does not exist in model definition . |
| 30 | 30 | if (!isset($my_model[$key])) { |
| 31 | 31 | if ($my_key !== null) { |
| 32 | - $my_key = strval($my_key) . " . " . strval($key); |
|
| 32 | + $my_key = strval($my_key)." . ".strval($key); |
|
| 33 | 33 | } else { |
| 34 | 34 | $my_key = $key; |
| 35 | 35 | } |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | } else { |
| 56 | 56 | $my_key = $key; |
| 57 | 57 | } |
| 58 | - throw new \Exception("Error for key '".$my_key."'" . ", ".ModelUtils::gettype($my_doc[$key]) . |
|
| 59 | - " given but it must be " . $my_model[$key]['_type']); |
|
| 58 | + throw new \Exception("Error for key '".$my_key."'".", ".ModelUtils::gettype($my_doc[$key]). |
|
| 59 | + " given but it must be ".$my_model[$key]['_type']); |
|
| 60 | 60 | } else { |
| 61 | 61 | $v_key = $key; |
| 62 | 62 | if ($my_key !== null) { |
@@ -267,23 +267,23 @@ discard block |
||
| 267 | 267 | case 'integer': |
| 268 | 268 | case 'float': |
| 269 | 269 | if ($min_length !== null) { |
| 270 | - if ($value < $min_length) { |
|
| 270 | + if ($value<$min_length) { |
|
| 271 | 271 | throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the ". |
| 272 | - "validation: Must be bigger than " . $min_length . " "); |
|
| 272 | + "validation: Must be bigger than ".$min_length." "); |
|
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | if ($max_length !== null) { |
| 276 | 276 | if ($value>$max_length) { |
| 277 | 277 | throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the ". |
| 278 | - "validation: Must be smallerr than " . $max_length . " "); |
|
| 278 | + "validation: Must be smallerr than ".$max_length." "); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | break; |
| 282 | 282 | default: |
| 283 | 283 | if ($max_length !== null) { |
| 284 | 284 | if (strlen($value)>$max_length) { |
| 285 | - throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the " . |
|
| 286 | - "validation: It's length must be smaller than " . $max_length . " "); |
|
| 285 | + throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the ". |
|
| 286 | + "validation: It's length must be smaller than ".$max_length." "); |
|
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | if ($min_length !== null) { |