Completed
Push — master ( 8930a4...8cf557 )
by Mehmet
02:52
created
src/ModelUtils.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                     return $my_doc[$key];
49 49
                 }
50 50
             } // Is the value of the array[key] have same variable type
51
-              //that stated in the definition of the model array.
51
+                //that stated in the definition of the model array.
52 52
             elseif (self::getType($my_doc[$key]) != $my_model[$key]['_type']) {
53 53
                 if ($my_key !== null) {
54 54
                     $my_key = $my_key." . ".$key;
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
             'float' => 'float',
390 390
             'object' => 'object',
391 391
             'resource' => 'resource',
392
-			'null' => 'null'
392
+            'null' => 'null'
393 393
         ][strtolower(gettype($value))];
394 394
     }
395 395
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.