@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return $value; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - private static function checkMinMax($type, $key, $value, $min_length, $max_length){ |
|
| 105 | + private static function checkMinMax($type, $key, $value, $min_length, $max_length) { |
|
| 106 | 106 | switch ($type) { |
| 107 | 107 | case 'integer': |
| 108 | 108 | case 'float': |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | break; |
| 119 | 119 | default: |
| 120 | 120 | if ($max_length !== null && (strlen($value)>$max_length)) { |
| 121 | - throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the " . |
|
| 121 | + throw new \Exception("Error for value '".$value."' for '".$key."' couldn't pass the ". |
|
| 122 | 122 | "validation: It's length must be smaller than ".$max_length." "); |
| 123 | 123 | } |
| 124 | 124 | if ($min_length !== null && (strlen($value)<$min_length)) { |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | return $value; |
| 333 | 333 | } |
| 334 | 334 | |
| 335 | - private static function setMaxMin($type, $value, $min_length, $max_length){ |
|
| 335 | + private static function setMaxMin($type, $value, $min_length, $max_length) { |
|
| 336 | 336 | switch ($type) { |
| 337 | 337 | case 'integer': |
| 338 | 338 | case 'float': |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | } |
| 345 | 345 | return $value; |
| 346 | 346 | case 'string': |
| 347 | - if ($max_length !== null && strlen($value)>$max_length ) { |
|
| 347 | + if ($max_length !== null && strlen($value)>$max_length) { |
|
| 348 | 348 | $value = substr($value, 0, $max_length); |
| 349 | 349 | } |
| 350 | 350 | return $value; |