Passed
Branchfeature/useWidgetsNamespaces (9efb1a)
by Robin
04:25
created
programs/Set/AppCustomSection.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -123,8 +123,7 @@  discard block
 block discarded – undo
123 123
             
124 124
             if(strpos($rawField, ':') === false){
125 125
                 $fieldName = $rawField;
126
-            }
127
-            else{
126
+            } else{
128 127
                 list ($fieldName, $parameters) = explode(':', $rawField);
129 128
                 $parameters = explode(';', $parameters);
130 129
                 foreach ($parameters as $parameter){
@@ -322,15 +321,13 @@  discard block
 block discarded – undo
322 321
             if(strpos($fieldName, '/') !== false){
323 322
                 list ($oneField, $foreignField) = explode('/', $fieldName);
324 323
                 $field = $recordSet->$oneField()->$foreignField;
325
-            }
326
-            else{
324
+            } else{
327 325
                 $field = $recordSet->$fieldName;
328 326
             }
329 327
             foreach ($condition as $op => $value){
330 328
                 if(! is_array($value)){
331 329
                     $criteria = $field->$op($value);
332
-                }
333
-                else{
330
+                } else{
334 331
                     foreach ($value as $foreignClassName => $foreignValues){
335 332
                         $foreignClassName = str_replace($App->classPrefix, '', $foreignClassName) . 'Set';
336 333
                         $foreignSet = $App->$foreignClassName();
@@ -339,8 +336,7 @@  discard block
 block discarded – undo
339 336
                         foreach ($foreignValues as $foreignFieldName => $foreignConditions){
340 337
                             if($foreignFieldName === '_foreignField'){
341 338
                                 $foreignField = $foreignConditions;
342
-                            }
343
-                            else{
339
+                            } else{
344 340
                                 foreach ($foreignConditions as $key => $val){
345 341
                                     $foreignCondition = $foreignSet->$foreignFieldName->$key($val);
346 342
                                 }
Please login to merge, or discard this patch.
programs/Set/AppSSESet.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -127,12 +127,10 @@  discard block
 block discarded – undo
127 127
         $users = array();
128 128
         if(!isset($for)){
129 129
             $users[] = $App->getCurrentUser();
130
-        }
131
-        else if(!is_array($for)){
130
+        } else if(!is_array($for)){
132 131
             if($for === 'all'){
133 132
                 $users = $App->getLoggedUsers();
134
-            }
135
-            else{
133
+            } else{
136 134
                 $users[] = $for;
137 135
             }
138 136
         }
@@ -166,12 +164,10 @@  discard block
 block discarded – undo
166 164
         $users = array();
167 165
         if(!isset($for)){
168 166
             $users[] = $App->getCurrentUser();
169
-        }
170
-        else if(!is_array($for)){
167
+        } else if(!is_array($for)){
171 168
             if($for === 'all'){
172 169
                 $users = $App->getLoggedUsers();
173
-            }
174
-            else{
170
+            } else{
175 171
                 $users[] = $for;
176 172
             }
177 173
         }
Please login to merge, or discard this patch.
programs/Set/AppRecord.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -351,8 +351,7 @@  discard block
 block discarded – undo
351 351
         if(isset($linkType)){
352 352
             if(is_array($linkType)){
353 353
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
354
-            }
355
-            else{
354
+            } else{
356 355
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
357 356
             }
358 357
         }
@@ -379,8 +378,7 @@  discard block
 block discarded – undo
379 378
         if(isset($linkType)){
380 379
             if(is_array($linkType)){
381 380
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
382
-            }
383
-            else{
381
+            } else{
384 382
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
385 383
             }
386 384
         }
Please login to merge, or discard this patch.
programs/Set/AppLinkSet.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -170,8 +170,7 @@  discard block
 block discarded – undo
170 170
         if(isset($linkType)){
171 171
             if(is_array($linkType)){
172 172
                 $criteria = $criteria->_AND_($this->type->in($linkType));
173
-            }
174
-            else{
173
+            } else{
175 174
                 $criteria = $criteria->_AND_($this->type->is($linkType));
176 175
             }
177 176
         }
@@ -207,8 +206,7 @@  discard block
 block discarded – undo
207 206
         if(isset($linkType)){
208 207
             if(is_array($linkType)){
209 208
                 $criteria = $criteria->_AND_($this->type->in($linkType));
210
-            }
211
-            else{
209
+            } else{
212 210
                 $criteria = $criteria->_AND_($this->type->is($linkType));
213 211
             }
214 212
         }
@@ -230,8 +228,7 @@  discard block
 block discarded – undo
230 228
         if(isset($linkType)){
231 229
             if(is_array($linkType)){
232 230
                 $criteria = $criteria->_AND_($this->type->in($linkType));
233
-            }
234
-            else{
231
+            } else{
235 232
                 $criteria = $criteria->_AND_($this->type->is($linkType));
236 233
             }
237 234
         }
@@ -263,8 +260,7 @@  discard block
 block discarded – undo
263 260
         if(isset($linkType)){
264 261
             if(is_array($linkType)){
265 262
                 $criteria = $criteria->_AND_($this->type->in($linkType));
266
-            }
267
-            else{
263
+            } else{
268 264
                 $criteria = $criteria->_AND_($this->type->is($linkType));
269 265
             }
270 266
         }
@@ -329,8 +325,7 @@  discard block
 block discarded – undo
329 325
         if(isset($linkType)){
330 326
             if(is_array($linkType)){
331 327
                 $criteria = $criteria->_AND_($this->type->in($linkType));
332
-            }
333
-            else{
328
+            } else{
334 329
                 $criteria = $criteria->_AND_($this->type->is($linkType));
335 330
             }
336 331
         }
Please login to merge, or discard this patch.
programs/Set/AppRecordSet.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -171,8 +171,7 @@  discard block
 block discarded – undo
171 171
                         
172 172
                         /*@var $customfield AppCustomField */
173 173
                     }
174
-                }
175
-                catch (\ORM_BackEndSelectException $e){
174
+                } catch (\ORM_BackEndSelectException $e){
176 175
                     // table does not exist, this error is thrown by the install program while creating the sets
177 176
                 }
178 177
             }
@@ -209,8 +208,7 @@  discard block
 block discarded – undo
209 208
             if($ormField instanceof \ORM_FkField){
210 209
                 $this->hasOne($customField->fieldname, $ormField->getForeignSetName())
211 210
                     ->setDescription($description);
212
-            }
213
-            else{
211
+            } else{
214 212
                 $this->addFields($ormField);
215 213
             }
216 214
         }
@@ -267,8 +265,7 @@  discard block
 block discarded – undo
267 265
         $linkSet = $this->App()->LinkSet();
268 266
         if(is_array($source) || ($source instanceof \Iterator)){
269 267
             return $linkSet->selectForSources($source, $this->getRecordClassName(), $linkType);
270
-        }
271
-        else{
268
+        } else{
272 269
             return $linkSet->selectForSource($source, $this->getRecordClassName(), $linkType);
273 270
         }
274 271
     }
@@ -288,8 +285,7 @@  discard block
 block discarded – undo
288 285
         $linkSet = $this->App()->LinkSet();
289 286
         if(is_array($target) || ($target instanceof \Iterator)){
290 287
             return $linkSet->selectForTargets($target, $this->getRecordClassName(), $linkType);
291
-        }
292
-        else{
288
+        } else{
293 289
             return $linkSet->selectForTarget($target, $this->getRecordClassName(), $linkType);
294 290
         }
295 291
     }
@@ -316,8 +312,7 @@  discard block
 block discarded – undo
316 312
         if(isset($linkType)){
317 313
             if(is_array($linkType)){
318 314
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
319
-            }
320
-            else{
315
+            } else{
321 316
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
322 317
             }
323 318
         }
@@ -348,8 +343,7 @@  discard block
 block discarded – undo
348 343
         if(isset($linkType)){
349 344
             if(is_array($linkType)){
350 345
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
351
-            }
352
-            else{
346
+            } else{
353 347
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
354 348
             }
355 349
         }
@@ -392,8 +386,7 @@  discard block
 block discarded – undo
392 386
         if(isset($linkType)){
393 387
             if(is_array($linkType)){
394 388
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
395
-            }
396
-            else{
389
+            } else{
397 390
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
398 391
             }
399 392
         }
@@ -436,8 +429,7 @@  discard block
 block discarded – undo
436 429
         if(isset($linkType)){
437 430
             if(is_array($linkType)){
438 431
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
439
-            }
440
-            else{
432
+            } else{
441 433
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
442 434
             }
443 435
         }
@@ -554,8 +546,7 @@  discard block
 block discarded – undo
554 546
         
555 547
         if(is_array($tagLabels)){
556 548
             $criteria = $criteria->_AND_($linkSet->targetId->label->in($tagLabels));
557
-        }
558
-        else{
549
+        } else{
559 550
             $criteria = $criteria->_AND_($linkSet->targetId->label->is($tagLabels));
560 551
         }
561 552
         if(isset($linkType)){
Please login to merge, or discard this patch.
programs/Set/AppCustomContainer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,15 +83,13 @@  discard block
 block discarded – undo
83 83
             if(strpos($fieldName, '/') !== false){
84 84
                 list ($oneField, $foreignField) = explode('/', $fieldName);
85 85
                 $field = $recordSet->$oneField()->$foreignField;
86
-            }
87
-            else{
86
+            } else{
88 87
                 $field = $recordSet->$fieldName;
89 88
             }
90 89
             foreach ($condition as $op => $value){
91 90
                 if(! is_array($value)){
92 91
                     $criteria = $field->$op($value);
93
-                }
94
-                else{
92
+                } else{
95 93
                     foreach ($value as $foreignClassName => $foreignValues){
96 94
                         $foreignClassName = str_replace($App->classPrefix, '', $foreignClassName) . 'Set';
97 95
                         $foreignSet = $App->$foreignClassName();
@@ -100,8 +98,7 @@  discard block
 block discarded – undo
100 98
                         foreach ($foreignValues as $foreignFieldName => $foreignConditions){
101 99
                             if($foreignFieldName === '_foreignField'){
102 100
                                 $foreignField = $foreignConditions;
103
-                            }
104
-                            else{
101
+                            } else{
105 102
                                 foreach ($foreignConditions as $key => $val){
106 103
                                     $foreignCondition = $foreignSet->$foreignFieldName->$key($val);
107 104
                                 }
Please login to merge, or discard this patch.
programs/AppUiObject.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
                 $returnedValue = $this;
86 86
             }
87 87
             return $returnedValue;
88
-        }
89
-        else{
88
+        } else{
90 89
             trigger_error('the method ' . $name . ' does not exists on ' . get_class($this) . ' and there is no widget defined with the setInheritedItem method');
91 90
         }
92 91
     }
Please login to merge, or discard this patch.
programs/Ui/AppCustomFieldEditor.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
             
57 57
             if(! empty($this->customfield->enumvalues)){
58 58
                 $values['enumvalues'] = unserialize($this->customfield->enumvalues);
59
-            }
60
-            else{
59
+            } else{
61 60
                 $values['enumvalues'] = array(
62 61
                     '0' => ''
63 62
                 );
Please login to merge, or discard this patch.
programs/Ui/AppUi.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                 if(isset($componentUi) && method_exists($componentUi, $name)){
63 63
                     return call_user_func_array(array($componentUi, $name), $arguments);
64 64
                 }
65
-            }catch(\Exception $e){}
65
+            } catch(\Exception $e){}
66 66
         }
67 67
         
68 68
         $rc = new \ReflectionClass($this);
Please login to merge, or discard this patch.