@@ -123,8 +123,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -127,12 +127,10 @@ discard block |
||
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 |
||
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 | } |
@@ -351,8 +351,7 @@ discard block |
||
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 |
||
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 | } |
@@ -170,8 +170,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -83,15 +83,13 @@ discard block |
||
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 |
||
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 | } |
@@ -85,8 +85,7 @@ |
||
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 | } |
@@ -56,8 +56,7 @@ |
||
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 | ); |
@@ -62,7 +62,7 @@ |
||
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); |
@@ -70,8 +70,7 @@ discard block |
||
70 | 70 | $W = bab_Widgets(); |
71 | 71 | if(isset($iconName)){ |
72 | 72 | $content = $W->Icon($labelText, $iconName); |
73 | - } |
|
74 | - else{ |
|
73 | + } else{ |
|
75 | 74 | $content = $labelText; |
76 | 75 | } |
77 | 76 | $button = $W->Link($content, $action, $id); |
@@ -90,8 +89,7 @@ discard block |
||
90 | 89 | { |
91 | 90 | if(! $this->local){ |
92 | 91 | $this->addClass('widget-toolbar'); |
93 | - } |
|
94 | - else{ |
|
92 | + } else{ |
|
95 | 93 | $this->addClass('app-toolbar'); |
96 | 94 | } |
97 | 95 | $this->addClass(\Func_Icons::ICON_LEFT_16); |