Passed
Branchfeature/minorImprovements (4046cc)
by Robin
04:29
created
programs/Ui/AppTableModelView.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         foreach ($this->visibleColumns as $columnPath => $column) {
131 131
 
132
-            if (! isset($this->columnsDescriptions[$columnPath])) {
132
+            if (!isset($this->columnsDescriptions[$columnPath])) {
133 133
                 $this->columnsDescriptions[$columnPath] = $column->getDescription();
134 134
             }
135 135
 
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
                     $direction = ':up';
157 157
                 }
158 158
 
159
-                $url = BabUrl::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath . $direction);
159
+                $url = BabUrl::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath.$direction);
160 160
                 if ($anchor = $this->getAnchor()) {
161
-                    $url .= '#' . urlencode($anchor);
161
+                    $url .= '#'.urlencode($anchor);
162 162
                 }
163 163
 
164 164
                 $columnItem = $W->Link($W->FlexItems($W->Label($columnLabel), $W->Items()
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_CONTENT_CENTER), $url)
167 167
                     ->addClass('widget-table-column-sorting-action');
168 168
                 if ($this->sortAjaxAction) {
169
-                    $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath . $direction), '');
169
+                    $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath.$direction), '');
170 170
                 }
171 171
                 $columnItem = $W->FlexItems($columnItem);
172 172
             } else {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                 $sizePolicy .= ' widget-table-column-sortable';
185 185
             }
186 186
             if ($isSearchable) {
187
-                if (! isset($this->filterBaseUrl)) {
187
+                if (!isset($this->filterBaseUrl)) {
188 188
                     $this->filterBaseUrl = $this->getRecordControllerProxy()->displayListFilter();
189 189
                 }
190 190
                 $url = $this->filterBaseUrl;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                     ->setDialogClass('box blue')
197 197
                     ->setDialogPositionRelativeToLink(true), 0);
198 198
                 $sizePolicy .= ' widget-table-column-searchable';
199
-                if (isset($filterValues[$columnPath]) && ! empty($filterValues[$columnPath])) {
199
+                if (isset($filterValues[$columnPath]) && !empty($filterValues[$columnPath])) {
200 200
                     $sizePolicy .= ' widget-table-column-searched';
201 201
                 }
202 202
             }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $this->toggleCheckAllBox->setTitle(widget_translate('Select all on page'));
216 216
         $this->toggleCheckAllBox->setSizePolicy('condensed');
217 217
         $this->toggleCheckAllBox->setCheckedValue(true);
218
-        if (isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && ! empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on') {
218
+        if (isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && !empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on') {
219 219
             $this->toggleCheckAllBox->setValue(true);
220 220
         }
221 221
         return $W->FlexItems($this->toggleCheckAllBox);
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function App()
258 258
     {
259
-        if (! isset($this->app)) {
259
+        if (!isset($this->app)) {
260 260
             // If the app object was not specified (through the setApp() method)
261 261
             // we try to select one according to the classname prefix.
262 262
             list($prefix) = explode('_', get_class($this));
263 263
             $functionalityName = ucwords($prefix);
264
-            $this->app = BabFunctionality::get('App/' . $functionalityName);
264
+            $this->app = BabFunctionality::get('App/'.$functionalityName);
265 265
             if (!$this->app) {
266 266
                 $this->app = BabFunctionality::get('App');
267 267
             }
@@ -318,14 +318,14 @@  discard block
 block discarded – undo
318 318
         $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber);
319 319
 
320 320
         if (isset($name)) {
321
-            $this->sortParameterName = $name . '[filter][sort]';
321
+            $this->sortParameterName = $name.'[filter][sort]';
322 322
         } else {
323 323
             $this->sortParameterName = 'filter[sort]';
324 324
         }
325 325
 
326 326
         if (isset($filter['sort'])) {
327 327
             $this->setSortField($filter['sort']);
328
-        } elseif (! isset($this->sortField)) {
328
+        } elseif (!isset($this->sortField)) {
329 329
 
330 330
             if (method_exists($this, 'getDefaultSortField')) {
331 331
                 $this->setSortField($this->getDefaultSortField());
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             if (is_array($value)) {
374 374
                 foreach ($value as $val) {
375 375
                     $val = trim($val);
376
-                    if (! empty($val)) {
376
+                    if (!empty($val)) {
377 377
                         return true;
378 378
                     }
379 379
                 }
@@ -530,11 +530,11 @@  discard block
 block discarded – undo
530 530
 
531 531
         foreach ($columns as $fieldName => $column) {
532 532
             $field = $column->getField();
533
-            if (! $column->isSearchable()) {
533
+            if (!$column->isSearchable()) {
534 534
                 continue;
535 535
             }
536 536
 
537
-            if (! ($field instanceof ORMField)) {
537
+            if (!($field instanceof ORMField)) {
538 538
                 $field = null;
539 539
             }
540 540
 
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
             }
561 561
         }
562 562
 
563
-        if (! $this->submit) {
563
+        if (!$this->submit) {
564 564
             $this->submit = $W->SubmitButton();
565 565
             $this->submit->setLabel(Widget_translate('Apply filter'));
566 566
         }
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
                 // $this->select->addClass(FuncIcons::ICON_LEFT_16);
595 595
 
596 596
                 foreach ($filterNames as $filterName) {
597
-                    $filter = $W->getUserConfiguration($controller->getModelViewDefaultId() . '/filters/' . $filterName, 'widgets', false);
597
+                    $filter = $W->getUserConfiguration($controller->getModelViewDefaultId().'/filters/'.$filterName, 'widgets', false);
598 598
 
599 599
                     // $this->select->addItem(
600 600
                     // $W->Link(
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
         $input->addClass('widget-100pc');
667 667
 
668 668
         $formItem = $this->handleFilterLabel($label, $input);
669
-        $formItem->addClass('compact', 'field_' . $fieldName);
669
+        $formItem->addClass('compact', 'field_'.$fieldName);
670 670
 
671 671
         return $formItem;
672 672
     }
@@ -707,14 +707,14 @@  discard block
 block discarded – undo
707 707
         // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber);
708 708
 
709 709
         if (isset($name)) {
710
-            $this->sortParameterName = $name . '[filter][sort]';
710
+            $this->sortParameterName = $name.'[filter][sort]';
711 711
         } else {
712 712
             $this->sortParameterName = 'filter[sort]';
713 713
         }
714 714
 
715 715
         if (isset($filter['sort'])) {
716 716
             $this->setSortField($filter['sort']);
717
-        } elseif (! isset($this->sortField)) {
717
+        } elseif (!isset($this->sortField)) {
718 718
 
719 719
             if (method_exists($this, 'getDefaultSortField')) {
720 720
                 $this->setSortField($this->getDefaultSortField());
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
      */
771 771
     public function getRecordControllerProxy()
772 772
     {
773
-        if (! isset($this->recordControllerProxy)) {
773
+        if (!isset($this->recordControllerProxy)) {
774 774
             $this->recordControllerProxy = $this->getRecordController()->proxy();
775 775
         }
776 776
         return $this->recordControllerProxy;
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
         return null;
790 790
     }
791 791
 
792
-    if (! isset($description) && $field instanceof ORMField) {
792
+    if (!isset($description) && $field instanceof ORMField) {
793 793
         $App = $field->getParentSet()->App();
794 794
         $description = $App->translate($field->getDescription());
795 795
     }
Please login to merge, or discard this patch.
programs/Ui/Page/AppPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      */
119 119
     public function addItem(?WidgetDisplayableInterface $item = null, $order = null)
120 120
     {
121
-        if (! isset($this->mainPanel)) {
121
+        if (!isset($this->mainPanel)) {
122 122
             $W = bab_widgets();
123 123
             $this->mainPanel = $W->VBoxLayout();
124 124
         }
Please login to merge, or discard this patch.
programs/Ui/Items/AppChip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 
110 110
         $attributes = $this->getAttributes();
111 111
         foreach ($attributes as $attributeName => $attributeValue) {
112
-            $html .= ' ' . $attributeName . '="' . $attributeValue . '"';
112
+            $html .= ' '.$attributeName.'="'.$attributeValue.'"';
113 113
         }
114 114
 
115 115
         $html .= '>';
Please login to merge, or discard this patch.
programs/Ui/AppToolbar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function __construct($id = null, ?WidgetLayout $layout = null)
47 47
     {
48
-        if (! isset($layout)) {
48
+        if (!isset($layout)) {
49 49
             $W = bab_Widgets();
50 50
             $layout = $W->FlowLayout()->setHorizontalSpacing(1, 'em');
51 51
             $layout->setVerticalAlign('top');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     public function display(WidgetCanvas $canvas)
101 101
     {
102
-        if (! $this->local) {
102
+        if (!$this->local) {
103 103
             $this->addClass('widget-toolbar');
104 104
         } else {
105 105
             $this->addClass('app-toolbar');
Please login to merge, or discard this patch.
programs/Ui/AppRecordView.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $displayFieldName = $displayField['fieldname'];
347 347
         $parameters = $displayField['parameters'];
348 348
         $label = isset($parameters['label']) && !empty($parameters['label']) ? $parameters['label'] : null;
349
-        $displayFieldMethod = '_' . $displayFieldName;
349
+        $displayFieldMethod = '_'.$displayFieldName;
350 350
         if (!$isGroupField && method_exists($this, $displayFieldMethod)) {
351 351
             $item = $this->$displayFieldMethod($customSection, $label);
352 352
         } else {
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
                     '',
413 413
                     $this->record->getController()->editSection($this->record->getFrontId(), $customSection->id)
414 414
                 )->addClass('widget-actionbutton', 'section-button', 'icon', FuncIcons::ACTIONS_DOCUMENT_EDIT)
415
-                    ->setOpenMode(WidgetLink::OPEN_DIALOG)->setDialogClass('customSectionEditorDialog ' . $customSection->classname . ' ' . $customSection->editDialogClass)
415
+                    ->setOpenMode(WidgetLink::OPEN_DIALOG)->setDialogClass('customSectionEditorDialog '.$customSection->classname.' '.$customSection->editDialogClass)
416 416
             );
417 417
         }
418 418
 
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 
604 604
                 $displayFieldName = $field['fieldname'];
605 605
 
606
-                $displayFieldMethod = '_' . $displayFieldName;
606
+                $displayFieldMethod = '_'.$displayFieldName;
607 607
 
608 608
                 if (strpos($displayFieldMethod, '__subSection') !== false) {
609 609
                     $item = $this->__subSection($customSection, $field);
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 
657 657
                 $displayFieldName = $field['fieldname'];
658 658
 
659
-                $displayFieldMethod = '_' . $displayFieldName;
659
+                $displayFieldMethod = '_'.$displayFieldName;
660 660
 
661 661
                 if (strpos($displayFieldMethod, '__fieldsGroup') !== false) {
662 662
                     $item = $this->__fieldsGroup($customSection, $field);
Please login to merge, or discard this patch.
programs/Ui/AppCriteriaEditor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $parentField = $this->criteria->getField();
86 86
 
87
-        if (! isset($parentField)) {
87
+        if (!isset($parentField)) {
88 88
             return null;
89 89
         }
90 90
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     if (empty($foreignFieldDescription)) {
163 163
                         $foreignFieldDescription = $foreignFieldName;
164 164
                     }
165
-                    $foreignPath = $path . '/' . $foreignRecordSetField->getPath();
165
+                    $foreignPath = $path.'/'.$foreignRecordSetField->getPath();
166 166
 
167 167
                     $recordSetFieldSelect->addOption($foreignPath, $foreignFieldDescription, $fieldName);
168 168
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
                 foreach ($foreignRecordSetFields as $foreignFieldName => $foreignRecordSetField) {
185 185
                     $foreignFieldDescription = $foreignFieldName;
186
-                    $foreignPath = $path . '/' . $foreignFieldName;
186
+                    $foreignPath = $path.'/'.$foreignFieldName;
187 187
 
188 188
                     $recordSetFieldSelect->addOption($foreignPath, $foreignFieldDescription, $fieldName);
189 189
 
Please login to merge, or discard this patch.
programs/Ui/AppCustomSectionEditor.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
         $extraExtraLargeDeviceClassnames = array(); //XXL
146 146
 
147 147
         for ($i = 1; $i <= 12; $i++) {
148
-            $extraSmallDeviceClassnames['col-xs-' . $i] = $i;
149
-            $smallDeviceClassnames['col-sm-' . $i] = $i;
150
-            $mediumDeviceClassnames['col-md-' . $i] = $i;
151
-            $largeDeviceClassnames['col-lg-' . $i] = $i;
152
-            $extraLargeDeviceClassnames['col-xl-' . $i] = $i;
153
-            $extraExtraLargeDeviceClassnames['col-xxl-' . $i] = $i;
148
+            $extraSmallDeviceClassnames['col-xs-'.$i] = $i;
149
+            $smallDeviceClassnames['col-sm-'.$i] = $i;
150
+            $mediumDeviceClassnames['col-md-'.$i] = $i;
151
+            $largeDeviceClassnames['col-lg-'.$i] = $i;
152
+            $extraLargeDeviceClassnames['col-xl-'.$i] = $i;
153
+            $extraExtraLargeDeviceClassnames['col-xxl-'.$i] = $i;
154 154
         }
155 155
 
156 156
         $box = $W->FlexItems()->setWrap(WidgetFlexLayout::FLEX_WRAP_WRAP)->setJustifyContent(WidgetFlexLayout::FLEX_JUSTIFY_CONTENT_SPACE_BETWEEN);
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
         foreach ($sizes as $sizePrefix => $size) {
186 186
             $box->addItem(
187 187
                 $this->labelledField(
188
-                    sprintf('%s (%s)', $size['label'], 'col-' . $sizePrefix . '-*'),
189
-                    $W->Select()->addOptions($size['classnames'])->setValue('col-' . $sizePrefix . '-12'),
188
+                    sprintf('%s (%s)', $size['label'], 'col-'.$sizePrefix.'-*'),
189
+                    $W->Select()->addOptions($size['classnames'])->setValue('col-'.$sizePrefix.'-12'),
190 190
                     array('sizePolicy', $sizePrefix)
191 191
                 )->addAttribute('style', 'flex-basis:50%')
192 192
             );
Please login to merge, or discard this patch.
programs/Ui/AppExportSelectEditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         $columns = $this->tableview->getVisibleColumns();
119 119
 
120 120
         foreach ($columns as $path => $column) {
121
-            if (! $column->isExportable()) {
121
+            if (!$column->isExportable()) {
122 122
                 continue;
123 123
             }
124 124
             $columnList->addItem($W->FlexItems($W->LabelledWidget($column->getSelectableName(), $checkbox = $W->CheckBox()
Please login to merge, or discard this patch.
programs/Ui/AppTableModelViewColumnSettingsEditor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $this->modelView = $modelView;
53 53
         $this->modelViewId = $modelView->getId();
54
-        if (! isset($id) || empty($id)) {
54
+        if (!isset($id) || empty($id)) {
55 55
             $id = $this->getDefaultEditorId();
56 56
         }
57 57
         parent::__construct($app, $id, $layout);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $select->addOption($pagesLength, $pagesLength);
108 108
         }
109 109
         $value = 15;
110
-        if (($temp = $W->getUserConfiguration($this->modelViewId . '/pageLength', 'widgets')) != null) {
110
+        if (($temp = $W->getUserConfiguration($this->modelViewId.'/pageLength', 'widgets')) != null) {
111 111
             $value = $temp;
112 112
         }
113 113
         $select->setValue($value);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             return null;
136 136
         }
137 137
         $checkbox = $W->CheckBox();
138
-        $checkbox->setValue($W->getUserConfiguration($this->modelViewId . '/displaySubTotalRow', 'widgets'));
138
+        $checkbox->setValue($W->getUserConfiguration($this->modelViewId.'/displaySubTotalRow', 'widgets'));
139 139
 
140 140
         return $W->LabelledWidget($this->App()
141 141
             ->translate('Display subtotal rows'), $checkbox, 'displaySubTotalRow')
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         foreach ($columns as $path => $column) {
170 170
 
171
-            if (! $column->isInList()) {
171
+            if (!$column->isInList()) {
172 172
                 continue;
173 173
             }
174 174
             if ($column->isSelectable() && $column->getSelectableName() != '') {
Please login to merge, or discard this patch.