Completed
Push — master ( 49228f...024767 )
by Henry Stivens
02:39
created
core/libs/upload/upload.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
     /**
136 136
      * Asigna las extensiones de archivos permitidas
137 137
      *
138
-     * @param array|string $value lista de extensiones para archivos, si es string separado por |
138
+     * @param string[] $value lista de extensiones para archivos, si es string separado por |
139 139
      */
140 140
     public function setExtensions($value) {
141 141
         if (!is_array($value)) {
Please login to merge, or discard this patch.
core/libs/upload/adapters/image_upload.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -187,10 +187,14 @@
 block discarded – undo
187 187
     protected function _validatesTypes()
188 188
     {
189 189
         // Verifica que sea un archivo de imagen
190
-        if (!$this->_imgInfo) return FALSE;
190
+        if (!$this->_imgInfo) {
191
+            return FALSE;
192
+        }
191 193
 
192 194
         foreach ($this->_types as $type) {
193
-            if ($this->_imgInfo['mime'] == "image/$type") return TRUE;
195
+            if ($this->_imgInfo['mime'] == "image/$type") {
196
+                return TRUE;
197
+            }
194 198
         }
195 199
 
196 200
         return FALSE;
Please login to merge, or discard this patch.
core/libs/redirect/redirect.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@
 block discarded – undo
86 86
             $vars = $url;
87 87
         }
88 88
         
89
-        if (++$cyclic > 1000)
90
-            throw new KumbiaException('Se ha detectado un enrutamiento cíclico. Esto puede causar problemas de estabilidad');
89
+        if (++$cyclic > 1000) {
90
+                    throw new KumbiaException('Se ha detectado un enrutamiento cíclico. Esto puede causar problemas de estabilidad');
91
+        }
91 92
 
92 93
         Router::to($vars, TRUE);
93 94
     }
Please login to merge, or discard this patch.
core/libs/validate/validate.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,11 +82,13 @@  discard block
 block discarded – undo
82 82
                 $ruleName = self::getRuleName($ruleName, $param);
83 83
                 $param =  self::getParams($param);
84 84
                 /*Ignore the rule is starts with "#"*/
85
-                if($ruleName[0] == '#') continue;
85
+                if($ruleName[0] == '#') {
86
+                    continue;
87
+                }
86 88
                 /*Es una validación de modelo*/
87 89
                 if($ruleName[0] == '@'){
88 90
                     $this->modelRule($ruleName, $param, $field);
89
-                }elseif(!Validations::$ruleName($value, $param, $this->obj)){
91
+                } elseif(!Validations::$ruleName($value, $param, $this->obj)){
90 92
                     $this->addError($param, $field, $ruleName);
91 93
                 }
92 94
             }
@@ -185,7 +187,8 @@  discard block
 block discarded – undo
185 187
      * @param Array $error
186 188
      */
187 189
     public static function errorToFlash(Array $error){
188
-        foreach ($error as $value)
189
-            Flash::error($value);
190
+        foreach ($error as $value) {
191
+                    Flash::error($value);
192
+        }
190 193
     }
191 194
 }
Please login to merge, or discard this patch.
core/libs/event/event.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,9 @@
 block discarded – undo
168 168
             self::$_events[$event][] = $handler2;
169 169
             return;
170 170
         }
171
-        if ($after) ++$i;
171
+        if ($after) {
172
+            ++$i;
173
+        }
172 174
 
173 175
         array_splice(self::$_events[$event], $i, 0, $handler2); 
174 176
     }
Please login to merge, or discard this patch.
core/libs/input/input.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
     public static function ip(){
155 155
         if (!empty($_SERVER['HTTP_CLIENT_IP'])){
156 156
             return $_SERVER['HTTP_CLIENT_IP'];
157
-        }elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
157
+        } elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
158 158
             return $_SERVER['HTTP_X_FORWARDED_FOR'];
159
-        }else{
159
+        } else{
160 160
             return $_SERVER['REMOTE_ADDR'];
161 161
         }
162 162
     }
@@ -181,8 +181,9 @@  discard block
 block discarded – undo
181 181
      * @return mixed
182 182
      */
183 183
     protected static function getFilter(Array $var, $str){
184
-        if(empty($str))
185
-            return filter_var_array($var);
184
+        if(empty($str)) {
185
+                    return filter_var_array($var);
186
+        }
186 187
         $arr = explode('.', $str);
187 188
         $value = $var;
188 189
         foreach ($arr as $key) {
Please login to merge, or discard this patch.
core/libs/file_util/file_util.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
      */
35 35
     public static function mkdir($path)
36 36
     {
37
-        if (file_exists($path) || @mkdir($path))
38
-            return TRUE;
37
+        if (file_exists($path) || @mkdir($path)) {
38
+                    return TRUE;
39
+        }
39 40
         return (self::mkdir(dirname($path)) && mkdir($path));
40 41
     }
41 42
 
Please login to merge, or discard this patch.
core/kumbia/kumbia_view.php 1 patch
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -136,8 +136,9 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public static function getPath()
138 138
     {
139
-        if (self::$_response)
140
-            return self::$_path . self::$_view . '.' . self::$_response . '.phtml';
139
+        if (self::$_response) {
140
+                    return self::$_path . self::$_view . '.' . self::$_response . '.phtml';
141
+        }
141 142
 
142 143
         return self::$_path . self::$_view . '.phtml';
143 144
     }
@@ -224,8 +225,9 @@  discard block
 block discarded – undo
224 225
      */
225 226
     public static function render(Controller $controller)
226 227
     {
227
-        if (!self::$_view && !self::$_template)
228
-            return ob_end_flush();
228
+        if (!self::$_view && !self::$_template) {
229
+                    return ob_end_flush();
230
+        }
229 231
 
230 232
         // Guarda el controlador
231 233
         self::$_controller = $controller;
@@ -253,8 +255,9 @@  discard block
 block discarded – undo
253 255
             ob_start();
254 256
 
255 257
             // carga la vista
256
-            if (!include self::getView())
257
-                throw new KumbiaException('Vista "' . self::getPath() . '" no encontrada', 'no_view');
258
+            if (!include self::getView()) {
259
+                            throw new KumbiaException('Vista "' . self::getPath() . '" no encontrada', 'no_view');
260
+            }
258 261
 
259 262
             // si esta en produccion y se cachea la vista
260 263
             self::saveCache('view');
@@ -274,8 +277,9 @@  discard block
 block discarded – undo
274 277
             ob_start();
275 278
 
276 279
             // carga el template
277
-            if (!include APP_PATH . "views/_shared/templates/$__template.phtml")
278
-                throw new KumbiaException("Template $__template no encontrado");
280
+            if (!include APP_PATH . "views/_shared/templates/$__template.phtml") {
281
+                            throw new KumbiaException("Template $__template no encontrado");
282
+            }
279 283
 
280 284
             // si esta en produccion y se cachea template
281 285
             self::saveCache('template');
@@ -351,7 +355,9 @@  discard block
 block discarded – undo
351 355
      */
352 356
     public static function getVar($var = '')
353 357
     {
354
-        if(!$var) return get_object_vars(self::$_controller);
358
+        if(!$var) {
359
+            return get_object_vars(self::$_controller);
360
+        }
355 361
 
356 362
         return isset(self::$_controller->$var) ? self::$_controller->$var : NULL;
357 363
     }
Please login to merge, or discard this patch.
core/kumbia/load.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,9 @@
 block discarded – undo
94 94
         foreach ($args as $model) {
95 95
             $Model = Util::camelcase(basename($model));
96 96
             //Si esta cargada continua con la siguiente clase
97
-            if (class_exists($Model, FALSE)) continue;
97
+            if (class_exists($Model, FALSE)) {
98
+                continue;
99
+            }
98 100
             if (!include APP_PATH . "models/$model.php") {
99 101
                 throw new KumbiaException($model,'no_model');
100 102
             }
Please login to merge, or discard this patch.