@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $box->addClass('reload-configuration-page'); |
114 | 114 | $box->addClass('widget-100pc'); |
115 | 115 | |
116 | - if (! isset($itemId)) { |
|
116 | + if (!isset($itemId)) { |
|
117 | 117 | $this->resetCurrentTab(); |
118 | 118 | } |
119 | 119 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $tabLinkHtml .= ' class="active"'; |
133 | 133 | } |
134 | 134 | $tabLinkHtml .= '>'; |
135 | - $tabLinkHtml .= $tabLink->display($htmlCanvas) . '</li>'; |
|
135 | + $tabLinkHtml .= $tabLink->display($htmlCanvas).'</li>'; |
|
136 | 136 | $navBoxHtml .= $tabLinkHtml; |
137 | 137 | } |
138 | 138 | |
@@ -162,14 +162,14 @@ discard block |
||
162 | 162 | ->addClass('icon-left icon-48x48 icon-left-48'); |
163 | 163 | $box->addItem($configBox); |
164 | 164 | |
165 | - if (! isset($configurationItems[$currentTab])) { |
|
165 | + if (!isset($configurationItems[$currentTab])) { |
|
166 | 166 | return $box; |
167 | 167 | } |
168 | 168 | |
169 | 169 | $tab = $configurationItems[$currentTab]; |
170 | 170 | |
171 | 171 | foreach ($tab['tabContent'] as $tabSection) { |
172 | - if (! isset($tabSection['sectionContent']) || empty($tabSection['sectionContent'])) { |
|
172 | + if (!isset($tabSection['sectionContent']) || empty($tabSection['sectionContent'])) { |
|
173 | 173 | continue; |
174 | 174 | } |
175 | 175 | $configBox->addItem($W->Section($tabSection['sectionName'], $sectionContentBox = $W->HBoxItems()) |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $definitions = $App->getComponentDefinitions(); |
202 | 202 | foreach ($definitions as $packageName => $definition) { |
203 | 203 | /* @var $definition AppComponentDefinition */ |
204 | - if (! method_exists($definition, 'getConfiguration')) { |
|
204 | + if (!method_exists($definition, 'getConfiguration')) { |
|
205 | 205 | continue; |
206 | 206 | } |
207 | 207 | $configurationItems[$packageName] = array( |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if ($data != '{}') { |
64 | 64 | echo "event: ping\n"; |
65 | 65 | echo "\n\n"; |
66 | - echo 'data: ' . $this->getSSEData() . "\n\n"; |
|
66 | + echo 'data: '.$this->getSSEData()."\n\n"; |
|
67 | 67 | } |
68 | 68 | ob_end_flush(); |
69 | 69 | flush(); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | private function getRefreshFrequency() |
89 | 89 | { |
90 | - if (! isset($this->refreshFrequency)) { |
|
90 | + if (!isset($this->refreshFrequency)) { |
|
91 | 91 | $registry = app_getRegistry(); |
92 | 92 | $registry->changeDirectory('configuration'); |
93 | 93 | $registry->changeDirectory('SSE'); |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | foreach ($allViewSections as $viewSection) { |
91 | 91 | $fields = $viewSection->getFields(); |
92 | 92 | foreach ($fields as $field) { |
93 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
93 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
94 | 94 | if (isset($field["fields"]) && is_array($field['fields'])) { |
95 | 95 | foreach ($field['fields'] as $subField) { |
96 | - $allViewFieldNames[$subField['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
96 | + $allViewFieldNames[$subField['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | $field = $customSection->getField($fieldName); |
170 | 170 | |
171 | - if (! isset($field)) { |
|
171 | + if (!isset($field)) { |
|
172 | 172 | return null; |
173 | 173 | } |
174 | 174 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | } |
283 | 283 | |
284 | 284 | |
285 | - if (! isset($groupField)) { |
|
285 | + if (!isset($groupField)) { |
|
286 | 286 | return null; |
287 | 287 | } |
288 | 288 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | return null; |
294 | 294 | } |
295 | 295 | |
296 | - if (! isset($field)) { |
|
296 | + if (!isset($field)) { |
|
297 | 297 | return null; |
298 | 298 | } |
299 | 299 | |
@@ -444,10 +444,10 @@ discard block |
||
444 | 444 | foreach ($allViewSections as $viewSection) { |
445 | 445 | $fields = $viewSection->getFields(); |
446 | 446 | foreach ($fields as $field) { |
447 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
447 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
448 | 448 | if (isset($field["fields"]) && is_array($field["fields"])) { |
449 | 449 | foreach ($field['fields'] as $subField) { |
450 | - $allViewFieldNames[$subField['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
450 | + $allViewFieldNames[$subField['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
451 | 451 | } |
452 | 452 | } |
453 | 453 | } |
@@ -536,10 +536,10 @@ discard block |
||
536 | 536 | foreach ($allViewSections as $viewSection) { |
537 | 537 | $fields = $viewSection->getFields(); |
538 | 538 | foreach ($fields as $field) { |
539 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
539 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
540 | 540 | if (isset($field["fields"]) && is_array($field['fields'])) { |
541 | 541 | foreach ($field['fields'] as $subField) { |
542 | - $allViewFieldNames[$subField['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
542 | + $allViewFieldNames[$subField['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
543 | 543 | } |
544 | 544 | } |
545 | 545 | } |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | $manySets = $objectRecordSet->getHasManyRelations(); |
724 | 724 | $oneSets = $objectRecordSet->getHasOneRelations(); |
725 | 725 | |
726 | - if (! empty($record->visibilityCriteria)) { |
|
726 | + if (!empty($record->visibilityCriteria)) { |
|
727 | 727 | $arrCriteria = json_decode($record->visibilityCriteria, true); |
728 | 728 | |
729 | 729 | $data = array(); |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | if (is_array($value)) { |
736 | 736 | foreach ($value as $key => $subValue) { |
737 | 737 | foreach ($manySets as $manyFieldName => $manyRelation) { |
738 | - if ($key . 'Set' == $manyRelation->getForeignSetClassName()) { |
|
738 | + if ($key.'Set' == $manyRelation->getForeignSetClassName()) { |
|
739 | 739 | foreach ($subValue as $subFieldName => $subConditions) { |
740 | 740 | if ($subFieldName === '_foreignField') { |
741 | 741 | continue; |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | } |
752 | 752 | } |
753 | 753 | foreach ($oneSets as $oneFieldName => $oneRelation) { |
754 | - if ($key . 'Set' == $oneRelation->getForeignSetClassName()) { |
|
754 | + if ($key.'Set' == $oneRelation->getForeignSetClassName()) { |
|
755 | 755 | foreach ($subValue as $subFieldName => $subConditions) { |
756 | 756 | if ($subFieldName === '_foreignField') { |
757 | 757 | continue; |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | */ |
793 | 793 | public function save($data = null) |
794 | 794 | { |
795 | - if (! isset($data['id']) && isset($data['container']) && $data['container'] != 0 && ! isset($data['rank'])) { |
|
795 | + if (!isset($data['id']) && isset($data['container']) && $data['container'] != 0 && !isset($data['rank'])) { |
|
796 | 796 | $set = $this->getRecordSet(); |
797 | 797 | $data['rank'] = $set->select($set->container->is($data['container'])) |
798 | 798 | ->count(); |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | return true; |
805 | 805 | } |
806 | 806 | |
807 | - protected function postSave(ORMRecord &$record, $data) |
|
807 | + protected function postSave(ORMRecord & $record, $data) |
|
808 | 808 | { |
809 | 809 | parent::postSave($record, $data); |
810 | 810 | $set = $record->getParentSet(); |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | |
940 | 940 | $visibilityCriteria = ''; |
941 | 941 | |
942 | - if (! empty($condition)) { |
|
942 | + if (!empty($condition)) { |
|
943 | 943 | $criteria = $field->{$condition}($data['value']); |
944 | 944 | $visibilityCriteria = $criteria->toJson(); |
945 | 945 | } |
@@ -1005,11 +1005,11 @@ discard block |
||
1005 | 1005 | |
1006 | 1006 | $currentColumn += $nbCol; |
1007 | 1007 | |
1008 | - $sectionSection = $W->Section($customSection->name . ' (' . $customSection->rank . ')', $sectionBox = $W->VBoxItems($W->Hidden() |
|
1009 | - ->setName('#' . $customSection->id))); |
|
1008 | + $sectionSection = $W->Section($customSection->name.' ('.$customSection->rank.')', $sectionBox = $W->VBoxItems($W->Hidden() |
|
1009 | + ->setName('#'.$customSection->id))); |
|
1010 | 1010 | $sectionSection->addClass('app-custom-section'); |
1011 | 1011 | $sectionSection->addClass($customSection->classname); |
1012 | - $sectionSection->setSizePolicy($customSection->sizePolicy . ' widget-sameheight'); |
|
1012 | + $sectionSection->setSizePolicy($customSection->sizePolicy.' widget-sameheight'); |
|
1013 | 1013 | |
1014 | 1014 | $row->addItem($sectionSection); |
1015 | 1015 | |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | ->setDialogClass('box red') |
1038 | 1038 | ) |
1039 | 1039 | ); |
1040 | - if (! empty($customSection->visibilityCriteria)) { |
|
1040 | + if (!empty($customSection->visibilityCriteria)) { |
|
1041 | 1041 | $sectionBox->addItem($W->HBoxItems($W->Label($App->translate('This section has a visibility condition'))) |
1042 | 1042 | ->setSizePolicy('alert alert-warning widget-100pc')); |
1043 | 1043 | } |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | ->setGrowable(true) |
1092 | 1092 | ->setWrap(WidgetFlexLayout::FLEX_WRAP_WRAP)) |
1093 | 1093 | ->setSizePolicy('maximum'), $btnBox = $W->HBoxItems($W->Hidden() |
1094 | - ->setName($customSection->id . '.' . $fieldId) |
|
1094 | + ->setName($customSection->id.'.'.$fieldId) |
|
1095 | 1095 | ->setValue($fieldName)) |
1096 | 1096 | ->addClass('widget-actions')) |
1097 | 1097 | ->setSizePolicy('widget-list-element widget-actions-target') |
@@ -1117,7 +1117,7 @@ discard block |
||
1117 | 1117 | $fieldGroupBox->addItem( |
1118 | 1118 | $flexField = $W->VBoxItems( |
1119 | 1119 | $W->HBoxItems( |
1120 | - $W->Hidden(null, array($customSection->id . '.fieldsGroups', $fieldName, $groupedField['fieldname']), $groupedField['fieldname']), |
|
1120 | + $W->Hidden(null, array($customSection->id.'.fieldsGroups', $fieldName, $groupedField['fieldname']), $groupedField['fieldname']), |
|
1121 | 1121 | $W->Label($groupedFieldDetails['description']), |
1122 | 1122 | $fieldMenu = $W->FlowItems( |
1123 | 1123 | $W->Link( |
@@ -1166,11 +1166,11 @@ discard block |
||
1166 | 1166 | $groupFieldItemMenu = $W->FlowItems( |
1167 | 1167 | $W->Link( |
1168 | 1168 | '', |
1169 | - $customSectionCtrl->editGroupFieldDisplayField($customSection->id, $fieldName . '/' . $groupedField['fieldname'], $subSectionField['fieldname']) |
|
1169 | + $customSectionCtrl->editGroupFieldDisplayField($customSection->id, $fieldName.'/'.$groupedField['fieldname'], $subSectionField['fieldname']) |
|
1170 | 1170 | )->addClass('icon', FuncIcons::ACTIONS_DOCUMENT_EDIT)->setOpenMode(WidgetLink::OPEN_DIALOG), |
1171 | 1171 | $W->Link( |
1172 | 1172 | '', |
1173 | - $customSectionCtrl->removeDisplayFieldFromGroup($customSection->id, $fieldName . '/' . $groupedField['fieldname'], $subSectionField['fieldname']) |
|
1173 | + $customSectionCtrl->removeDisplayFieldFromGroup($customSection->id, $fieldName.'/'.$groupedField['fieldname'], $subSectionField['fieldname']) |
|
1174 | 1174 | )->addClass('icon', FuncIcons::ACTIONS_LIST_REMOVE)->setAjaxAction() |
1175 | 1175 | ) |
1176 | 1176 | ) |
@@ -1179,7 +1179,7 @@ discard block |
||
1179 | 1179 | $groupFieldItemMenu->addItem( |
1180 | 1180 | $W->Link( |
1181 | 1181 | '', |
1182 | - $customSectionCtrl->addDisplayFieldToGroup($customSection->id, $fieldName . '/' . $groupedField['fieldname'] . '/' . $subSectionField['fieldname']) |
|
1182 | + $customSectionCtrl->addDisplayFieldToGroup($customSection->id, $fieldName.'/'.$groupedField['fieldname'].'/'.$subSectionField['fieldname']) |
|
1183 | 1183 | )->addClass('icon', FuncIcons::ACTIONS_LIST_ADD)->setOpenMode(WidgetLink::OPEN_DIALOG), |
1184 | 1184 | 0 |
1185 | 1185 | ); |
@@ -1194,11 +1194,11 @@ discard block |
||
1194 | 1194 | $W->FlowItems( |
1195 | 1195 | $W->Link( |
1196 | 1196 | '', |
1197 | - $customSectionCtrl->editGroupFieldDisplayField($customSection->id, $fieldName . '/' . $groupedField['fieldname'] . '/' . $subSectionField['fieldname'], $subSectionFieldGroupFields['fieldname']) |
|
1197 | + $customSectionCtrl->editGroupFieldDisplayField($customSection->id, $fieldName.'/'.$groupedField['fieldname'].'/'.$subSectionField['fieldname'], $subSectionFieldGroupFields['fieldname']) |
|
1198 | 1198 | )->addClass('icon', FuncIcons::ACTIONS_DOCUMENT_EDIT)->setOpenMode(WidgetLink::OPEN_DIALOG), |
1199 | 1199 | $W->Link( |
1200 | 1200 | '', |
1201 | - $customSectionCtrl->removeDisplayFieldFromGroup($customSection->id, $fieldName . '/' . $groupedField['fieldname'] . '/' . $subSectionField['fieldname'], $subSectionFieldGroupFields['fieldname']) |
|
1201 | + $customSectionCtrl->removeDisplayFieldFromGroup($customSection->id, $fieldName.'/'.$groupedField['fieldname'].'/'.$subSectionField['fieldname'], $subSectionFieldGroupFields['fieldname']) |
|
1202 | 1202 | )->addClass('icon', FuncIcons::ACTIONS_LIST_REMOVE)->setAjaxAction() |
1203 | 1203 | ) |
1204 | 1204 | ) |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | } |
1286 | 1286 | |
1287 | 1287 | header('Content-type: application/json'); |
1288 | - header('Content-Disposition: attachment; filename="' . $container->object . '.' . ($container->view === '' ? 'default' : $container->view) . '.' . $container->name . '.json"' . "\n"); |
|
1288 | + header('Content-Disposition: attachment; filename="'.$container->object.'.'.($container->view === '' ? 'default' : $container->view).'.'.$container->name.'.json"'."\n"); |
|
1289 | 1289 | |
1290 | 1290 | $json = bab_json_encode($sectionsValues); |
1291 | 1291 | $json = bab_convertStringFromDatabase($json, BabCharset::UTF_8); |
@@ -1342,7 +1342,7 @@ discard block |
||
1342 | 1342 | break; |
1343 | 1343 | } |
1344 | 1344 | |
1345 | - if (! isset($data)) { |
|
1345 | + if (!isset($data)) { |
|
1346 | 1346 | $this->addError($App->translate('Unable to get file content')); |
1347 | 1347 | return true; |
1348 | 1348 | } |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | if (substr($key, 0, 1) === '#') { |
1431 | 1431 | $currentSectionId = substr($key, 1); |
1432 | 1432 | $rawSectionData[$currentSectionId] = array(); |
1433 | - if (! isset($oldSectionId)) { |
|
1433 | + if (!isset($oldSectionId)) { |
|
1434 | 1434 | $oldSectionId = $currentSectionId; |
1435 | 1435 | } |
1436 | 1436 | if (isset($currentSection) && $oldSectionId != $currentSectionId) { |
@@ -1441,7 +1441,7 @@ discard block |
||
1441 | 1441 | $currentSection = $customSectionSet->get($customSectionSet->id->is($currentSectionId)); |
1442 | 1442 | continue; |
1443 | 1443 | } |
1444 | - if (! isset($currentSection)) { |
|
1444 | + if (!isset($currentSection)) { |
|
1445 | 1445 | continue; |
1446 | 1446 | } |
1447 | 1447 | list($fieldSectionId, $fieldName) = explode('.', $key); |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | $rawSectionData[$currentSectionId][$fieldName]['block'] = $field['block']; |
1452 | 1452 | $rawSectionData[$currentSectionId][$fieldName]['fieldname'] = '_fieldsGroup'; |
1453 | 1453 | $rawSectionData[$currentSectionId][$fieldName]['parameters'] = $field['parameters']; |
1454 | - foreach ($sections[$currentSection->id . '.fieldsGroups'][$fieldName] as $subKey => $subValue) { |
|
1454 | + foreach ($sections[$currentSection->id.'.fieldsGroups'][$fieldName] as $subKey => $subValue) { |
|
1455 | 1455 | $rawSectionData[$currentSectionId][$fieldName]['fields'][$subKey] = $field['fields'][$subKey]; |
1456 | 1456 | } |
1457 | 1457 | } elseif ($fieldName != 'fieldsGroups') { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | use function Cofy\Utilities\User\bab_isUserAdministrator; |
64 | 64 | use function Cofy\Utilities\User\bab_isUserLogged; |
65 | 65 | |
66 | -require_once dirname(__FILE__) . '/../functions.php'; |
|
66 | +require_once dirname(__FILE__).'/../functions.php'; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @method self proxy() |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | public function isAjaxRequest() |
240 | 240 | { |
241 | - if (! isset($this->isAjaxRequest)) { |
|
241 | + if (!isset($this->isAjaxRequest)) { |
|
242 | 242 | $this->isAjaxRequest = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); |
243 | 243 | } |
244 | 244 | return $this->isAjaxRequest; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $authType = ''; |
257 | 257 | } |
258 | 258 | |
259 | - if (! isset($message)) { |
|
259 | + if (!isset($message)) { |
|
260 | 260 | $message = $this->App()->translate('You must be logged in to access this page.'); |
261 | 261 | } |
262 | 262 | |
@@ -280,10 +280,10 @@ discard block |
||
280 | 280 | list($prefix) = explode('_', __CLASS__); |
281 | 281 | $functionalityName = ucwords($prefix); |
282 | 282 | /** @var FuncApp */ |
283 | - $App = BabFunctionality::get('App/' . $functionalityName); |
|
283 | + $App = BabFunctionality::get('App/'.$functionalityName); |
|
284 | 284 | |
285 | 285 | if (!$App) { |
286 | - throw new AppException('Faild to autodetect functionality App/' . $functionalityName . ', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
286 | + throw new AppException('Faild to autodetect functionality App/'.$functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead'); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | $controller = $App->ControllerProxy($classname, $proxy); |
@@ -301,14 +301,14 @@ discard block |
||
301 | 301 | static function getProxyInstance(?BabFunctionality $App = null, $classname) |
302 | 302 | { |
303 | 303 | $class = new \ReflectionClass($classname); |
304 | - $proxyClassname = $class->getShortName() . self::PROXY_CLASS_SUFFIX; |
|
305 | - $finalProxyClassname = $class->getNamespaceName() . "\\" . $proxyClassname; |
|
306 | - if (! class_exists($finalProxyClassname)) { |
|
304 | + $proxyClassname = $class->getShortName().self::PROXY_CLASS_SUFFIX; |
|
305 | + $finalProxyClassname = $class->getNamespaceName()."\\".$proxyClassname; |
|
306 | + if (!class_exists($finalProxyClassname)) { |
|
307 | 307 | $classStr = ""; |
308 | 308 | if ($class->getNamespaceName() != "") { |
309 | - $classStr .= " namespace " . $class->getNamespaceName() . "; "; |
|
309 | + $classStr .= " namespace ".$class->getNamespaceName()."; "; |
|
310 | 310 | } |
311 | - $classStr .= 'class ' . $proxyClassname . ' extends ' . $class->getShortName() . ' {' . "\n"; |
|
311 | + $classStr .= 'class '.$proxyClassname.' extends '.$class->getShortName().' {'."\n"; |
|
312 | 312 | $methods = $class->getMethods(); |
313 | 313 | |
314 | 314 | $classStr .= ' public function __construct($App) { |
@@ -316,11 +316,11 @@ discard block |
||
316 | 316 | }' . "\n"; |
317 | 317 | |
318 | 318 | foreach ($methods as $method) { |
319 | - if ($method->name === '__construct' || ! $method->isPublic() || $method->isStatic() || $method->isFinal() || $method->name === 'setApp' || $method->name === 'App' || $method->name === 'setCrm' || $method->name === 'Crm') { |
|
319 | + if ($method->name === '__construct' || !$method->isPublic() || $method->isStatic() || $method->isFinal() || $method->name === 'setApp' || $method->name === 'App' || $method->name === 'setCrm' || $method->name === 'Crm') { |
|
320 | 320 | continue; |
321 | 321 | } |
322 | 322 | |
323 | - $classStr .= ' public function ' . $method->name . '('; |
|
323 | + $classStr .= ' public function '.$method->name.'('; |
|
324 | 324 | $types = array(); |
325 | 325 | if ($type = $method->getReturnType()) { |
326 | 326 | if ($type instanceof ReflectionUnionType) { |
@@ -340,22 +340,22 @@ discard block |
||
340 | 340 | $reference = "&"; |
341 | 341 | } |
342 | 342 | if ($parameter->isDefaultValueAvailable()) { |
343 | - $parametersStr[] = $reference . '$' . $parameter->name . ' = ' . var_export($parameter->getDefaultValue(), true); |
|
343 | + $parametersStr[] = $reference.'$'.$parameter->name.' = '.var_export($parameter->getDefaultValue(), true); |
|
344 | 344 | } else { |
345 | - $parametersStr[] = $reference . '$' . $parameter->name; |
|
345 | + $parametersStr[] = $reference.'$'.$parameter->name; |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | $classStr .= implode(', ', $parametersStr); |
349 | 349 | $classStr .= ')'; |
350 | 350 | if (count($types) != 0) { |
351 | - $classStr .= ':' . implode('|', $types); |
|
351 | + $classStr .= ':'.implode('|', $types); |
|
352 | 352 | } |
353 | - $classStr .= '{' . "\n"; |
|
354 | - $classStr .= ' $args = func_get_args();' . "\n"; |
|
355 | - $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);' . "\n"; |
|
356 | - $classStr .= ' }' . "\n"; |
|
353 | + $classStr .= '{'."\n"; |
|
354 | + $classStr .= ' $args = func_get_args();'."\n"; |
|
355 | + $classStr .= ' return $this->getMethodAction(__FUNCTION__, $args);'."\n"; |
|
356 | + $classStr .= ' }'."\n"; |
|
357 | 357 | } |
358 | - $classStr .= '}' . "\n"; |
|
358 | + $classStr .= '}'."\n"; |
|
359 | 359 | // We define the proxy class |
360 | 360 | eval($classStr); |
361 | 361 | } |
@@ -430,8 +430,8 @@ discard block |
||
430 | 430 | |
431 | 431 | $rc = new ReflectionClass($fullClassName); |
432 | 432 | |
433 | - if (! $rc->hasMethod($methodName)) { |
|
434 | - throw new BabInvalidActionException($fullClassName . '::' . $methodName); |
|
433 | + if (!$rc->hasMethod($methodName)) { |
|
434 | + throw new BabInvalidActionException($fullClassName.'::'.$methodName); |
|
435 | 435 | } |
436 | 436 | $method = new ReflectionMethod($fullClassName, $methodName); |
437 | 437 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | |
455 | 455 | $action = new WidgetAction(); |
456 | 456 | |
457 | - $action->setMethod($this->getControllerTg(), $objectName . '.' . $methodName, $actionParams); |
|
457 | + $action->setMethod($this->getControllerTg(), $objectName.'.'.$methodName, $actionParams); |
|
458 | 458 | |
459 | 459 | $docComment = $method->getDocComment(); |
460 | 460 | if (strpos($docComment, '@ajax') !== false) { |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | |
495 | 495 | list(,, $file) = explode('/', $App->controllerTg); |
496 | 496 | |
497 | - $action->setParameter('addon', $App->getAddonName() . '.' . $file); |
|
497 | + $action->setParameter('addon', $App->getAddonName().'.'.$file); |
|
498 | 498 | $action->setParameter('idx', $idx); |
499 | 499 | |
500 | 500 | return $action; |
@@ -512,13 +512,13 @@ discard block |
||
512 | 512 | |
513 | 513 | $method = $action->getMethod(); |
514 | 514 | $returnedValue = null; |
515 | - if (! isset($method) || '' === $method) { |
|
515 | + if (!isset($method) || '' === $method) { |
|
516 | 516 | return false; |
517 | 517 | } |
518 | 518 | |
519 | 519 | list($objectName,) = explode('.', $method); |
520 | 520 | |
521 | - if (! method_exists($this, $objectName)) { |
|
521 | + if (!method_exists($this, $objectName)) { |
|
522 | 522 | /* @var $component AppComponent */ |
523 | 523 | $component = $this->app->getComponentByName($objectName); |
524 | 524 | if ($component) { |
@@ -530,9 +530,9 @@ discard block |
||
530 | 530 | } |
531 | 531 | } |
532 | 532 | |
533 | - if (! isset($component)) { |
|
533 | + if (!isset($component)) { |
|
534 | 534 | $objectController = $this->{$objectName}(false); |
535 | - if (! ($objectController instanceof AppController)) { |
|
535 | + if (!($objectController instanceof AppController)) { |
|
536 | 536 | return false; |
537 | 537 | } |
538 | 538 | } |
@@ -541,12 +541,12 @@ discard block |
||
541 | 541 | $returnedValue = $objectController->execAction($action); |
542 | 542 | } catch (AppAccessException $e) { |
543 | 543 | |
544 | - if (! bab_isUserLogged() && $e->requireCredential) { |
|
544 | + if (!bab_isUserLogged() && $e->requireCredential) { |
|
545 | 545 | bab_requireCredential($e->getMessage()); |
546 | 546 | } else { |
547 | 547 | if ($this->isAjaxRequest()) { |
548 | 548 | |
549 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
549 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
550 | 550 | |
551 | 551 | die(bab_json_encode(array( |
552 | 552 | 'exception' => 'app_AccessException', |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | } catch (AppSaveException $e) { |
560 | 560 | |
561 | 561 | if ($this->isAjaxRequest()) { |
562 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
562 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
563 | 563 | header('Cache-Control: no-cache, must-revalidate'); |
564 | 564 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
565 | 565 | header('Content-type: application/json'); |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | |
585 | 585 | if ($returnedValue instanceof WidgetItem) { |
586 | 586 | |
587 | - if ($returnedValue instanceof WidgetBabPage && ! $this->isAjaxRequest()) { |
|
587 | + if ($returnedValue instanceof WidgetBabPage && !$this->isAjaxRequest()) { |
|
588 | 588 | |
589 | 589 | // If the action returned a page, we display it. |
590 | 590 | $returnedValue->displayHtml(); |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | if (method_exists($htmlCanvas, 'sendPageTitle')) { |
611 | 611 | $htmlCanvas->sendPageTitle($pageTitle); |
612 | 612 | } else { |
613 | - header('X-Cto-PageTitle: ' . $pageTitle); |
|
613 | + header('X-Cto-PageTitle: '.$pageTitle); |
|
614 | 614 | } |
615 | 615 | } |
616 | 616 | $html = $returnedValue->display($htmlCanvas); |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | protected function deletedItemPage(WidgetAction $action, AppDeletedRecordException $e) |
677 | 677 | { |
678 | 678 | if ($this->isAjaxRequest()) { |
679 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
679 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
680 | 680 | header('Cache-Control: no-cache, must-revalidate'); |
681 | 681 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
682 | 682 | header('Content-type: application/json'); |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | ) |
690 | 690 | )); |
691 | 691 | } |
692 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
692 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
693 | 693 | |
694 | 694 | $App = app_App(); |
695 | 695 | $W = bab_Widgets(); |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | protected function notFoundPage(WidgetAction $action, AppNotFoundException $e) |
722 | 722 | { |
723 | 723 | if ($this->isAjaxRequest()) { |
724 | - $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle() . ' (' . $e->getId() . ')'); |
|
724 | + $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle().' ('.$e->getId().')'); |
|
725 | 725 | $json = array( |
726 | 726 | 'messages' => array( |
727 | 727 | array( |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | echo bab_json_encode($json); |
734 | 734 | die(); |
735 | 735 | } |
736 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); |
|
736 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404); |
|
737 | 737 | header('Cache-Control: no-cache, must-revalidate'); |
738 | 738 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
739 | 739 | |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | protected function unexpectedErrorPage(\Exception $e) |
764 | 764 | { |
765 | 765 | if ($this->isAjaxRequest()) { |
766 | - $message = sprintf(app_translate('An unexpected error occured') . ':' . '%s', $e->getMessage()); |
|
766 | + $message = sprintf(app_translate('An unexpected error occured').':'.'%s', $e->getMessage()); |
|
767 | 767 | $json = array( |
768 | 768 | 'messages' => array( |
769 | 769 | array( |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | echo bab_json_encode($json); |
776 | 776 | die(); |
777 | 777 | } |
778 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500); |
|
778 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500); |
|
779 | 779 | header('Cache-Control: no-cache, must-revalidate'); |
780 | 780 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
781 | 781 | |
@@ -799,11 +799,11 @@ discard block |
||
799 | 799 | ->addClass('widget-50pc alert alert-danger') |
800 | 800 | ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL)); |
801 | 801 | |
802 | - $logCode = '#' . hrtime(true); |
|
802 | + $logCode = '#'.hrtime(true); |
|
803 | 803 | $message = addcslashes($e->getMessage(), "\000..\037\177..\377\\"); |
804 | 804 | $trace = addcslashes($e->getTraceAsString(), "\000..\037\177..\377\\"); |
805 | 805 | |
806 | - error_log(sprintf('Error %s : %s', $logCode, $message) . PHP_EOL . $trace); |
|
806 | + error_log(sprintf('Error %s : %s', $logCode, $message).PHP_EOL.$trace); |
|
807 | 807 | |
808 | 808 | $section->addItems($W->Title($App->translate('Error'), 1), $W->Title($App->translate('An unexpected error occured')), $W->Label(sprintf($App->translate('It has been logged with the following error code : %s'), $logCode))); |
809 | 809 | |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | protected function errorPage(\Exception $e) |
827 | 827 | { |
828 | 828 | if ($this->isAjaxRequest()) { |
829 | - $message = sprintf(app_translate('An unexpected error occured') . ':' . '%s', $e->getMessage()); |
|
829 | + $message = sprintf(app_translate('An unexpected error occured').':'.'%s', $e->getMessage()); |
|
830 | 830 | $json = array( |
831 | 831 | 'messages' => array( |
832 | 832 | array( |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | echo bab_json_encode($json); |
839 | 839 | die(); |
840 | 840 | } |
841 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500); |
|
841 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500); |
|
842 | 842 | header('Cache-Control: no-cache, must-revalidate'); |
843 | 843 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
844 | 844 | |
@@ -862,11 +862,11 @@ discard block |
||
862 | 862 | ->addClass('widget-50pc alert alert-danger') |
863 | 863 | ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL)); |
864 | 864 | |
865 | - $logCode = '#' . hrtime(true); |
|
865 | + $logCode = '#'.hrtime(true); |
|
866 | 866 | $message = addcslashes($e->getMessage(), "\000..\037\177..\377\\"); |
867 | 867 | $trace = addcslashes($e->getTraceAsString(), "\000..\037\177..\377\\"); |
868 | 868 | |
869 | - error_log(sprintf('Error %s : %s', $logCode, $message) . PHP_EOL . $trace); |
|
869 | + error_log(sprintf('Error %s : %s', $logCode, $message).PHP_EOL.$trace); |
|
870 | 870 | |
871 | 871 | $section->addItems($W->Title($App->translate('Error'), 1), $W->Title($App->translate('An unexpected error occured')), $W->Label(sprintf($App->translate('It has been logged with the following error code : %s'), $logCode))); |
872 | 872 | |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | echo bab_json_encode($json); |
902 | 902 | die(); |
903 | 903 | } |
904 | - header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403); |
|
904 | + header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403); |
|
905 | 905 | header('Cache-Control: no-cache, must-revalidate'); |
906 | 906 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
907 | 907 | |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | 'position' => $position |
986 | 986 | ); |
987 | 987 | $babBody = bab_getBody(); |
988 | - if (! isset($babBody->messages['toasts'])) { |
|
988 | + if (!isset($babBody->messages['toasts'])) { |
|
989 | 989 | $babBody->messages['toasts'] = array(); |
990 | 990 | } |
991 | 991 | $babBody->messages['toasts'][] = $toast; |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | |
66 | 66 | bab_Widgets(); |
67 | 67 | |
68 | -require_once dirname(__FILE__) . '/define.php'; |
|
69 | -require_once dirname(__FILE__) . '/functions.php'; |
|
68 | +require_once dirname(__FILE__).'/define.php'; |
|
69 | +require_once dirname(__FILE__).'/functions.php'; |
|
70 | 70 | |
71 | 71 | $libappAddon = bab_getAddonInfosInstance('libapp'); |
72 | 72 | $libappPhpPath = $libappAddon->getPhpPath(); |
73 | 73 | |
74 | -require_once $libappPhpPath . '../vendor/autoload.php'; |
|
74 | +require_once $libappPhpPath.'../vendor/autoload.php'; |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * Provides extensible functionalities to manage an application. |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | $this->addonPrefix = 'app'; |
108 | 108 | |
109 | 109 | $this->classPrefix = 'App'; |
110 | - $this->controllerTg = 'addon/' . $this->addonName . '/main'; |
|
110 | + $this->controllerTg = 'addon/'.$this->addonName.'/main'; |
|
111 | 111 | |
112 | 112 | $addon = bab_getAddonInfosInstance($this->addonName); |
113 | 113 | $this->phpPath = $addon->getPhpPath(); |
114 | 114 | $this->recordSetPath = $this->phpPath; |
115 | 115 | $this->ctrlPath = $this->phpPath; |
116 | - $this->uiPath = $this->phpPath . 'ui/'; |
|
116 | + $this->uiPath = $this->phpPath.'ui/'; |
|
117 | 117 | |
118 | 118 | $babDB = bab_GetDatabaseInstance(); |
119 | 119 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | public function addComponentsFromName($componentName) |
128 | 128 | { |
129 | - $componentDefinitionObjectName = 'Capwelton\App\\' . $componentName . '\ComponentDefinition\ComponentDefinition'; |
|
129 | + $componentDefinitionObjectName = 'Capwelton\App\\'.$componentName.'\ComponentDefinition\ComponentDefinition'; |
|
130 | 130 | if (class_exists($componentDefinitionObjectName)) { |
131 | 131 | $componentDefinition = new $componentDefinitionObjectName; |
132 | 132 | $components = $componentDefinition->getComponents($this); |
@@ -271,8 +271,8 @@ discard block |
||
271 | 271 | public function getRecordSetPathname($class) |
272 | 272 | { |
273 | 273 | // $App->MyRecordSet() -> myrecord.class.php |
274 | - $file = strtolower(substr($class, strlen($this->classPrefix), -3)) . '.class.php'; |
|
275 | - return $this->recordSetPath . $file; |
|
274 | + $file = strtolower(substr($class, strlen($this->classPrefix), -3)).'.class.php'; |
|
275 | + return $this->recordSetPath.$file; |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | /** |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | public function getRecordPathname($class) |
285 | 285 | { |
286 | 286 | // $App->MyRecord() -> myrecord.class.php |
287 | - $file = strtolower(substr($class, strlen($this->classPrefix))) . '.class.php'; |
|
288 | - return $this->recordSetPath . $file; |
|
287 | + $file = strtolower(substr($class, strlen($this->classPrefix))).'.class.php'; |
|
288 | + return $this->recordSetPath.$file; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | /** |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | |
386 | 386 | if (substr($method, 0, 7) === 'include' && substr($method, -3) === 'Set') { |
387 | 387 | $incl = $method; |
388 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
388 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
389 | 389 | |
390 | 390 | |
391 | 391 | $classname = $this->$classNameMethod(); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | // We need to revert to multilang fields before synchronizing. |
410 | 410 | $set->useLang(false); |
411 | 411 | } |
412 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
412 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
413 | 413 | } |
414 | 414 | } |
415 | 415 | } |
@@ -431,11 +431,11 @@ discard block |
||
431 | 431 | return $methods; |
432 | 432 | } |
433 | 433 | |
434 | - $lines = array_map(function ($line) { |
|
434 | + $lines = array_map(function($line) { |
|
435 | 435 | return trim($line, " *"); |
436 | 436 | }, explode("\n", $doc)); |
437 | 437 | |
438 | - $lines = array_filter($lines, function ($line) { |
|
438 | + $lines = array_filter($lines, function($line) { |
|
439 | 439 | return strpos($line, "@method") === 0; |
440 | 440 | }); |
441 | 441 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | // We need to revert to multilang fields before synchronizing. |
479 | 479 | $set->useLang(false); |
480 | 480 | } |
481 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
481 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
482 | 482 | |
483 | 483 | if (empty($component->getPackageName())) { |
484 | 484 | $noPackageNames[] = $component->getName(); |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | return null; |
548 | 548 | } |
549 | 549 | |
550 | - require_once $GLOBALS['babInstallPath'] . 'utilit/devtools.php'; |
|
550 | + require_once $GLOBALS['babInstallPath'].'utilit/devtools.php'; |
|
551 | 551 | $mysqlbackend = new ORMMySqlBackend($GLOBALS['babDB']); |
552 | 552 | $sql = ''; |
553 | 553 | |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | |
556 | 556 | if (substr($method, 0, strlen('include')) === 'include' && substr($method, -strlen('Set')) === 'Set') { |
557 | 557 | $incl = $method; |
558 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
558 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
559 | 559 | |
560 | 560 | $classname = $this->$classNameMethod(); |
561 | 561 | |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | |
571 | 571 | if (class_exists($classname) && method_exists($this, $call)) { |
572 | 572 | $set = $this->$call(); |
573 | - $sql .= $mysqlbackend->setToSql($set) . "\n"; |
|
573 | + $sql .= $mysqlbackend->setToSql($set)."\n"; |
|
574 | 574 | } |
575 | 575 | } |
576 | 576 | } |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | |
585 | 585 | public function includeBase() |
586 | 586 | { |
587 | - require_once APP_PHP_PATH . 'base.class.php'; |
|
587 | + require_once APP_PHP_PATH.'base.class.php'; |
|
588 | 588 | } |
589 | 589 | |
590 | 590 | /** |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | public function getRecordSetByRef($recordClassname) |
627 | 627 | { |
628 | 628 | $recordClassname = str_replace($this->classPrefix, '', $recordClassname); |
629 | - $classSet = $recordClassname . 'Set'; |
|
629 | + $classSet = $recordClassname.'Set'; |
|
630 | 630 | $set = $this->$classSet(); |
631 | 631 | return $set; |
632 | 632 | } |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | { |
667 | 667 | $fullClassName = get_class($record); |
668 | 668 | list(, $className) = explode('_', $fullClassName); |
669 | - return $className . ':' . $record->id; |
|
669 | + return $className.':'.$record->id; |
|
670 | 670 | } |
671 | 671 | |
672 | 672 | |
@@ -778,16 +778,16 @@ discard block |
||
778 | 778 | */ |
779 | 779 | public function mailTo($addr, $subject = null, $body = null) |
780 | 780 | { |
781 | - $mailTo = 'mailto:' . $addr; |
|
781 | + $mailTo = 'mailto:'.$addr; |
|
782 | 782 | $parameters = array(); |
783 | 783 | if (isset($subject)) { |
784 | - $parameters[] = 'subject=' . $subject; |
|
784 | + $parameters[] = 'subject='.$subject; |
|
785 | 785 | } |
786 | 786 | if (isset($body)) { |
787 | - $parameters[] = 'body=' . $body; |
|
787 | + $parameters[] = 'body='.$body; |
|
788 | 788 | } |
789 | 789 | if (!empty($parameters)) { |
790 | - $mailTo .= '?' . implode('&', $parameters); |
|
790 | + $mailTo .= '?'.implode('&', $parameters); |
|
791 | 791 | } |
792 | 792 | |
793 | 793 | return $mailTo; |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | } |
839 | 839 | |
840 | 840 | $number = number_format($number, $decimals, ',', ' '); |
841 | - return str_replace(' ', bab_nbsp(), $number . ' ' . $prefix . $unitSymbol); |
|
841 | + return str_replace(' ', bab_nbsp(), $number.' '.$prefix.$unitSymbol); |
|
842 | 842 | } |
843 | 843 | |
844 | 844 | |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | } |
860 | 860 | |
861 | 861 | if (!isset($format)) { |
862 | - $format = BabRegistry::get('/' . $this->addonName . '/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
862 | + $format = BabRegistry::get('/'.$this->addonName.'/numberFormat', $PhoneNumber->getDefaultFormat()); |
|
863 | 863 | } |
864 | 864 | $phoneNumberUtil = $PhoneNumber->PhoneNumberUtil(); |
865 | 865 | |
@@ -899,10 +899,10 @@ discard block |
||
899 | 899 | $prefix = ''; |
900 | 900 | if (!empty($namespace)) { |
901 | 901 | $namespaces = explode('\\', $namespace); |
902 | - $prefix = $namespaces[0] . '\\' . $namespaces[1] . '\Ctrl\\'; |
|
902 | + $prefix = $namespaces[0].'\\'.$namespaces[1].'\Ctrl\\'; |
|
903 | 903 | } |
904 | 904 | $this->includeController(); |
905 | - return bab_getInstance($prefix . $this->classPrefix . 'Controller')->setApp($this); |
|
905 | + return bab_getInstance($prefix.$this->classPrefix.'Controller')->setApp($this); |
|
906 | 906 | } |
907 | 907 | |
908 | 908 | |
@@ -945,10 +945,10 @@ discard block |
||
945 | 945 | $prefix = ''; |
946 | 946 | if (!empty($namespace)) { |
947 | 947 | $namespaces = explode('\\', $namespace); |
948 | - $prefix = $namespaces[0] . '\\' . $namespaces[1] . '\Ui\\'; |
|
948 | + $prefix = $namespaces[0].'\\'.$namespaces[1].'\Ui\\'; |
|
949 | 949 | } |
950 | 950 | $this->includeUi(); |
951 | - return bab_getInstance($prefix . $this->classPrefix . 'Ui')->setApp($this); |
|
951 | + return bab_getInstance($prefix.$this->classPrefix.'Ui')->setApp($this); |
|
952 | 952 | } |
953 | 953 | |
954 | 954 | /** |
@@ -978,22 +978,22 @@ discard block |
||
978 | 978 | if ($component = $this->getComponentByName($className)) { |
979 | 979 | return $component->getSetClassName(); |
980 | 980 | } |
981 | - $setName = $className . 'Set'; |
|
982 | - return $this->classPrefix . $setName; |
|
981 | + $setName = $className.'Set'; |
|
982 | + return $this->classPrefix.$setName; |
|
983 | 983 | |
984 | 984 | case substr($name, -strlen('ClassName')) === 'ClassName': |
985 | 985 | $recordName = substr($name, 0, strlen($name) - strlen('ClassName')); |
986 | 986 | if ($component = $this->getComponentByName($recordName)) { |
987 | 987 | return $component->getRecordClassName(); |
988 | 988 | } |
989 | - return $this->classPrefix . $recordName; |
|
989 | + return $this->classPrefix.$recordName; |
|
990 | 990 | |
991 | 991 | case substr($name, 0, strlen('include')) === 'include' && substr($name, -strlen('Set')) === 'Set': |
992 | 992 | $fileNameBase = strtolower(substr(substr($name, 0, strlen($name) - strlen('Set')), strlen('include'))); |
993 | 993 | if ($this->getComponentByName($fileNameBase)) { |
994 | 994 | return; |
995 | 995 | } |
996 | - $path = APP_SET_PATH . $fileNameBase . '.class.php'; |
|
996 | + $path = APP_SET_PATH.$fileNameBase.'.class.php'; |
|
997 | 997 | if (is_file($path)) { |
998 | 998 | require_once $path; |
999 | 999 | } |
@@ -1016,8 +1016,8 @@ discard block |
||
1016 | 1016 | case ($component = $this->getComponentByName($name)) != false: |
1017 | 1017 | return $component; |
1018 | 1018 | default: |
1019 | - $setName = $name . 'Set'; |
|
1020 | - $recordClassNameMethod = $name . 'ClassName'; |
|
1019 | + $setName = $name.'Set'; |
|
1020 | + $recordClassNameMethod = $name.'ClassName'; |
|
1021 | 1021 | $recordClassName = $this->$recordClassNameMethod(); |
1022 | 1022 | if (isset($arguments[0])) { |
1023 | 1023 | if ($arguments[0] instanceof $recordClassName) { |
@@ -1159,7 +1159,7 @@ discard block |
||
1159 | 1159 | { |
1160 | 1160 | global $babDB; |
1161 | 1161 | $users = array(); |
1162 | - $res = $babDB->db_query("SELECT DISTINCT(id_user) FROM " . BAB_USERS_LOG_TBL . " WHERE id_user != 0"); |
|
1162 | + $res = $babDB->db_query("SELECT DISTINCT(id_user) FROM ".BAB_USERS_LOG_TBL." WHERE id_user != 0"); |
|
1163 | 1163 | while (list($id_user) = $babDB->db_fetch_array($res)) { |
1164 | 1164 | $users[] = $id_user; |
1165 | 1165 | } |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | |
1231 | 1231 | if (substr($method, 0, 7) === 'include' && substr($method, -3) === 'Set') { |
1232 | 1232 | $incl = $method; |
1233 | - $classNameMethod = substr($method, strlen('include')) . 'ClassName'; |
|
1233 | + $classNameMethod = substr($method, strlen('include')).'ClassName'; |
|
1234 | 1234 | |
1235 | 1235 | |
1236 | 1236 | $classname = $this->$classNameMethod(); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | protected function logSave(AppTraceableRecord $record, $noTrace) |
153 | 153 | { |
154 | - if (! $this->isLoggable()) { |
|
154 | + if (!$this->isLoggable()) { |
|
155 | 155 | return; |
156 | 156 | } |
157 | 157 | $App = $this->App(); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | protected function logDelete(ORMCriteria $criteria, $noTrace) |
176 | 176 | { |
177 | - if (! $this->isLoggable()) { |
|
177 | + if (!$this->isLoggable()) { |
|
178 | 178 | return; |
179 | 179 | } |
180 | 180 | $App = $this->App(); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function delete(?ORMCriteria $criteria = null, $deletedStatus = AppTraceableRecord::DELETED_STATUS_DELETED) |
252 | 252 | { |
253 | - $definitive = ($deletedStatus === true) || ! $this->isTraceable(); |
|
253 | + $definitive = ($deletedStatus === true) || !$this->isTraceable(); |
|
254 | 254 | $this->logDelete($criteria, $definitive); |
255 | 255 | if ($definitive) { |
256 | 256 | return parent::delete($criteria); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $record->deletedOn = $now; |
268 | 268 | $record->deletedBy = bab_getUserId(); |
269 | 269 | |
270 | - if (! parent::save($record)) { |
|
270 | + if (!parent::save($record)) { |
|
271 | 271 | return false; |
272 | 272 | } |
273 | 273 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function save(ORMRecord $record, $noTrace = false) |
287 | 287 | { |
288 | - $noTrace = $noTrace || ! $this->isTraceable(); |
|
288 | + $noTrace = $noTrace || !$this->isTraceable(); |
|
289 | 289 | $this->logSave($record, $noTrace); |
290 | 290 | if ($noTrace) { |
291 | 291 | return parent::save($record); |
@@ -334,11 +334,11 @@ discard block |
||
334 | 334 | |
335 | 335 | $record = $this->get($this->uuid->is($uuid)); |
336 | 336 | |
337 | - if (! isset($record)) { |
|
337 | + if (!isset($record)) { |
|
338 | 338 | return null; |
339 | 339 | } |
340 | 340 | |
341 | - if (! ($record instanceof AppTraceableRecord)) { |
|
341 | + if (!($record instanceof AppTraceableRecord)) { |
|
342 | 342 | return null; |
343 | 343 | } |
344 | 344 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function isOwn($userId = null) |
360 | 360 | { |
361 | - if (! isset($userId)) { |
|
361 | + if (!isset($userId)) { |
|
362 | 362 | $userId = bab_getUserId(); |
363 | 363 | } |
364 | 364 | return $this->createdBy->is($userId); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $value = $this->oParentSet->getBackend()->getRecordValue($this, $sFieldName); |
71 | 71 | $field = $this->oParentSet->$sFieldName; |
72 | - if (! is_null($value) && $field instanceof ORMFkField) { |
|
72 | + if (!is_null($value) && $field instanceof ORMFkField) { |
|
73 | 73 | |
74 | 74 | $sClassName = $field->getForeignSetName(); |
75 | 75 | if ($field instanceof AppFkField) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function App() |
109 | 109 | { |
110 | - if (! isset($this->app)) { |
|
110 | + if (!isset($this->app)) { |
|
111 | 111 | // If the app object was not specified (through the setApp() method), |
112 | 112 | // we set it as parent set's App. |
113 | 113 | $this->setApp($this->getParentSet() |
@@ -147,18 +147,18 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function getRef() |
149 | 149 | { |
150 | - if (! isset($this->id)) { |
|
150 | + if (!isset($this->id)) { |
|
151 | 151 | throw new AppException('Trying to get the reference string of a record without an id.'); |
152 | 152 | } |
153 | 153 | $classname = $this->getClassName(); |
154 | - return $classname . ':' . $this->id; |
|
154 | + return $classname.':'.$this->id; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | public function getFrontRef() |
158 | 158 | { |
159 | 159 | if ($this->getParentSet()->usesWebIdTrait() && isset($this->webId)) { |
160 | 160 | $classname = $this->getClassName(); |
161 | - return $classname . ':' . $this->webId; |
|
161 | + return $classname.':'.$this->webId; |
|
162 | 162 | } |
163 | 163 | return $this->getRef(); |
164 | 164 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | { |
188 | 188 | $App = $this->App(); |
189 | 189 | |
190 | - if (! isset($deletedStatus)) { |
|
190 | + if (!isset($deletedStatus)) { |
|
191 | 191 | $deletedStatus = AppTraceableRecord::DELETED_STATUS_DELETED; |
192 | 192 | } |
193 | 193 | |
@@ -623,9 +623,9 @@ discard block |
||
623 | 623 | */ |
624 | 624 | public function requireReadable($message = null) |
625 | 625 | { |
626 | - if (! $this->isReadable()) { |
|
626 | + if (!$this->isReadable()) { |
|
627 | 627 | $App = $this->App(); |
628 | - if (! isset($message)) { |
|
628 | + if (!isset($message)) { |
|
629 | 629 | $message = $App->translate('Access denied'); |
630 | 630 | } |
631 | 631 | throw new AppAccessException($message); |
@@ -641,9 +641,9 @@ discard block |
||
641 | 641 | */ |
642 | 642 | public function requireUpdatable($message = null) |
643 | 643 | { |
644 | - if (! $this->isUpdatable()) { |
|
644 | + if (!$this->isUpdatable()) { |
|
645 | 645 | $App = $this->App(); |
646 | - if (! isset($message)) { |
|
646 | + if (!isset($message)) { |
|
647 | 647 | $message = $App->translate('Access denied'); |
648 | 648 | } |
649 | 649 | throw new AppAccessException($message); |
@@ -659,9 +659,9 @@ discard block |
||
659 | 659 | */ |
660 | 660 | public function requireDeletable($message = null) |
661 | 661 | { |
662 | - if (! $this->isDeletable()) { |
|
662 | + if (!$this->isDeletable()) { |
|
663 | 663 | $App = $this->App(); |
664 | - if (! isset($message)) { |
|
664 | + if (!isset($message)) { |
|
665 | 665 | $message = $App->translate('Access denied'); |
666 | 666 | } |
667 | 667 | throw new AppAccessException($message); |
@@ -156,13 +156,13 @@ discard block |
||
156 | 156 | public function join($fkFieldName) |
157 | 157 | { |
158 | 158 | $fkField = $this->getField($fkFieldName); |
159 | - if (! ($fkField instanceof ORMFkField)) { |
|
159 | + if (!($fkField instanceof ORMFkField)) { |
|
160 | 160 | return $this; |
161 | 161 | } |
162 | 162 | $setName = $fkField->getForeignSetName(); |
163 | 163 | |
164 | - if (! $setName || 'Set' === $setName) { |
|
165 | - throw new \Exception('The set name is missing on foreign key field ' . $fkFieldName); |
|
164 | + if (!$setName || 'Set' === $setName) { |
|
165 | + throw new \Exception('The set name is missing on foreign key field '.$fkFieldName); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | $appSetName = $this->trimSetName($setName); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $ownerSetFieldName = $fieldName; |
200 | 200 | |
201 | 201 | if (substr($foreignSetClassName, -3, 3) !== 'Set') { |
202 | - $foreignSetClassName = $foreignSetClassName . 'Set'; |
|
202 | + $foreignSetClassName = $foreignSetClassName.'Set'; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | $oRelations = bab_getInstance('Capwelton\LibOrm\MySql\ORMRelations'); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $ownerSetFieldName = $fieldName; |
220 | 220 | |
221 | 221 | if (substr($foreignSetClassName, -3, 3) !== 'Set') { |
222 | - $foreignSetClassName = $foreignSetClassName . 'Set'; |
|
222 | + $foreignSetClassName = $foreignSetClassName.'Set'; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | $oRelations = bab_getInstance('Capwelton\LibOrm\MySql\ORMRelations'); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | public function request($mixedParam = null, $sPropertyName = null) |
340 | 340 | { |
341 | 341 | $record = $this->get($mixedParam, $sPropertyName); |
342 | - if (! isset($record)) { |
|
342 | + if (!isset($record)) { |
|
343 | 343 | // This will remove the default criteria for TraceableRecords and |
344 | 344 | // fetch even 'deleted' ones. |
345 | 345 | $this->setDefaultCriteria(null); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | if (strpos($sourceClass, '\\')) { |
511 | 511 | $sourceClass = (new \ReflectionClass($sourceClass))->getShortName(); |
512 | 512 | } |
513 | - if (! isset($sourceIdsByClasses[$sourceClass])) { |
|
513 | + if (!isset($sourceIdsByClasses[$sourceClass])) { |
|
514 | 514 | $sourceIdsByClasses[$sourceClass] = array(); |
515 | 515 | } |
516 | 516 | $sourceIdsByClasses[$sourceClass][] = $source->id; |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | if (strpos($targetClass, '\\')) { |
564 | 564 | $targetClass = (new \ReflectionClass($targetClass))->getShortName(); |
565 | 565 | } |
566 | - if (! isset($targetIdsByClasses[$targetClass])) { |
|
566 | + if (!isset($targetIdsByClasses[$targetClass])) { |
|
567 | 567 | $targetIdsByClasses[$targetClass] = array(); |
568 | 568 | } |
569 | 569 | $targetIdsByClasses[$targetClass][] = $target->id; |
@@ -129,7 +129,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |