Passed
Branchfeature/useWidgetsNamespaces (b6928f)
by Robin
03:02
created
programs/Func_App.php 2 patches
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         if(isset($this->components[$componentName])){
161 161
             return $this->components[$componentName];
162
-        }else{
162
+        } else{
163 163
             return null;
164 164
         }
165 165
     }
@@ -427,8 +427,7 @@  discard block
 block discarded – undo
427 427
                 if(empty($component->getPackageName())){
428 428
                     $noPackageNames[] = $component->getName();
429 429
                 }
430
-            }
431
-            catch (\Exception $e){
430
+            } catch (\Exception $e){
432 431
                 
433 432
             }
434 433
         }
Please login to merge, or discard this patch.
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 use Capwelton\LibOrm\ORMRecordSet;
39 39
 use Capwelton\LibOrm\MySql\ORMMySqlBackend;
40 40
 
41
-require_once dirname(__FILE__) . '/define.php';
42
-require_once dirname(__FILE__) . '/functions.php';
41
+require_once dirname(__FILE__).'/define.php';
42
+require_once dirname(__FILE__).'/functions.php';
43 43
 
44 44
 $libappAddon = bab_getAddonInfosInstance('libapp');
45 45
 $libappPhpPath = $libappAddon->getPhpPath();
46 46
 
47
-require_once $libappPhpPath . '../vendor/autoload.php';
47
+require_once $libappPhpPath.'../vendor/autoload.php';
48 48
 
49 49
 /**
50 50
  * Provides extensible functionalities to manage an application.
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         $this->addonPrefix = 'app';
81 81
 
82 82
         $this->classPrefix = 'App';
83
-        $this->controllerTg = 'addon/' . $this->addonName . '/main';
83
+        $this->controllerTg = 'addon/'.$this->addonName.'/main';
84 84
 
85 85
         $addon = bab_getAddonInfosInstance($this->addonName);
86 86
         $this->phpPath = $addon->getPhpPath();
87 87
         $this->recordSetPath = $this->phpPath;
88 88
         $this->ctrlPath = $this->phpPath;
89
-        $this->uiPath = $this->phpPath . 'ui/';
89
+        $this->uiPath = $this->phpPath.'ui/';
90 90
 
91 91
         $babDB = bab_getDB();
92 92
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         if (class_exists($componentDefinitionObjectName)) {
104 104
             $componentDefinition = new $componentDefinitionObjectName;
105 105
             $components = $componentDefinition->getComponents($this);
106
-            foreach ($components as $singleName => $singleComponent){
106
+            foreach ($components as $singleName => $singleComponent) {
107 107
                 $this->addComponent($singleName, $singleComponent);
108 108
             }
109 109
         }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $nbElem = count($componentName);
133 133
         $componentName = $componentName[$nbElem - 1];
134 134
         $componentName = strtoupper($componentName);
135
-        if(isset($this->components[$componentName])){
135
+        if (isset($this->components[$componentName])) {
136 136
             return $this->components[$componentName];
137 137
         }
138 138
         return null;
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     
162 162
     public function __get($componentName)
163 163
     {
164
-        if(isset($this->components[$componentName])){
164
+        if (isset($this->components[$componentName])) {
165 165
             return $this->components[$componentName];
166
-        }else{
166
+        } else {
167 167
             return null;
168 168
         }
169 169
     }
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
         
183 183
         $messages = array();
184 184
         
185
-        foreach ($components as $componentName => $component){
185
+        foreach ($components as $componentName => $component) {
186 186
             $dependencies = $component->checkDependencies();
187
-            foreach($dependencies['requiredComponents'] as $requiredComponent){
187
+            foreach ($dependencies['requiredComponents'] as $requiredComponent) {
188 188
                 $messages['requiredComponents'][$componentName][] = $requiredComponent;
189 189
             }
190
-            foreach($dependencies['optionalComponents'] as $optionalComponent){
190
+            foreach ($dependencies['optionalComponents'] as $optionalComponent) {
191 191
                 $messages['optionalComponents'][$componentName][] = $optionalComponent;
192 192
             }
193 193
         }
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
     {
200 200
         $components = $this->getComponents();
201 201
         $componentDefinitions = array();
202
-        foreach ($components as $component){
202
+        foreach ($components as $component) {
203 203
             $packageName = $component->getPackageName();
204
-            if(isset($componentDefinitions[$packageName]) && !empty($componentDefinitions[$packageName])){
204
+            if (isset($componentDefinitions[$packageName]) && !empty($componentDefinitions[$packageName])) {
205 205
                 continue;
206 206
             }
207 207
             $componentDefinitions[$packageName] = $component->getDefinition();
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
     public function getRecordSetPathname($class)
245 245
     {
246 246
         // $App->MyRecordSet() -> myrecord.class.php
247
-        $file = strtolower(substr($class, strlen($this->classPrefix), -3)) . '.class.php';
248
-        return $this->recordSetPath . $file;
247
+        $file = strtolower(substr($class, strlen($this->classPrefix), -3)).'.class.php';
248
+        return $this->recordSetPath.$file;
249 249
     }
250 250
 
251 251
     /**
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
     public function getRecordPathname($class)
258 258
     {
259 259
         // $App->MyRecord() -> myrecord.class.php
260
-        $file = strtolower(substr($class, strlen($this->classPrefix))) . '.class.php';
261
-        return $this->recordSetPath . $file;
260
+        $file = strtolower(substr($class, strlen($this->classPrefix))).'.class.php';
261
+        return $this->recordSetPath.$file;
262 262
     }
263 263
 
264 264
     /**
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
             if (substr($method, 0, 7) === 'include' && substr($method, -3) === 'Set') {
361 361
                 $incl = $method;
362
-                $classNameMethod = substr($method, strlen('include')) . 'ClassName';
362
+                $classNameMethod = substr($method, strlen('include')).'ClassName';
363 363
 
364 364
 
365 365
                 $classname = $this->$classNameMethod();
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
                                 // We need to revert to multilang fields before synchronizing.
382 382
                                 $set->useLang(false);
383 383
                             }
384
-                            $sql .= $mysqlbackend->setToSql($set) . "\n";
384
+                            $sql .= $mysqlbackend->setToSql($set)."\n";
385 385
                         }
386 386
                     }
387 387
                 }
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
             ';
409 409
 
410 410
         $noPackageNames = array();
411
-        foreach ($this->components as $component){
411
+        foreach ($this->components as $component) {
412 412
             /* @var $component AppComponent */
413
-            try{
413
+            try {
414 414
                 /* @var $set ORMRecordSet */
415 415
                 $set = $component->recordSet();
416 416
                 //Check if the component is not overriden by the addon
@@ -418,26 +418,26 @@  discard block
 block discarded – undo
418 418
                 //In case the set has been overriden, we simply do nothing here, as it will be instanciated by the synchronizeSql method
419 419
                 $cmprc = new \ReflectionClass($set);
420 420
                 $componentSetClass = $cmprc->getShortName();
421
-                if(method_exists($this, $componentSetClass)){
421
+                if (method_exists($this, $componentSetClass)) {
422 422
                     continue;
423 423
                 }
424
-                if(method_exists($set, 'useLang')){
424
+                if (method_exists($set, 'useLang')) {
425 425
                     // This is necessary if the recordSet constructor uses a setLang().
426 426
                     // We need to revert to multilang fields before synchronizing.
427 427
                     $set->useLang(false);
428 428
                 }
429
-                $sql .= $mysqlbackend->setToSql($set) . "\n";
429
+                $sql .= $mysqlbackend->setToSql($set)."\n";
430 430
                 
431
-                if(empty($component->getPackageName())){
431
+                if (empty($component->getPackageName())) {
432 432
                     $noPackageNames[] = $component->getName();
433 433
                 }
434 434
             }
435
-            catch (\Exception $e){
435
+            catch (\Exception $e) {
436 436
                 
437 437
             }
438 438
         }
439 439
         
440
-        if(!empty($noPackageNames)){
440
+        if (!empty($noPackageNames)) {
441 441
             $errorMessage = implode(', ', $noPackageNames);
442 442
             \bab_installWindow::message(
443 443
                 sprintf(
@@ -461,18 +461,18 @@  discard block
 block discarded – undo
461 461
         $synchronize->fromSqlString($sql);
462 462
         
463 463
         $dependencies = $this->checkComponentsDependencies();
464
-        foreach ($dependencies['requiredComponents'] as $componentName => $requiredComponents){
465
-            foreach ($requiredComponents as $requiredComponent){
464
+        foreach ($dependencies['requiredComponents'] as $componentName => $requiredComponents) {
465
+            foreach ($requiredComponents as $requiredComponent) {
466 466
                 $hasComponent = $this->getComponentByName($requiredComponent);
467
-                if(!$hasComponent){
467
+                if (!$hasComponent) {
468 468
                     \bab_installWindow::message(sprintf($this->translate('The component %s is required for the component %s to work. You will encounter fatal errors'), $requiredComponent, $componentName));
469 469
                 }
470 470
             }
471 471
         }
472
-        foreach ($dependencies['optionalComponents'] as $componentName => $optionalComponents){
473
-            foreach ($optionalComponents as $optionalComponent){
472
+        foreach ($dependencies['optionalComponents'] as $componentName => $optionalComponents) {
473
+            foreach ($optionalComponents as $optionalComponent) {
474 474
                 $hasComponent = $this->getComponentByName($optionalComponent);
475
-                if(!$hasComponent){
475
+                if (!$hasComponent) {
476 476
                     \bab_installWindow::message(sprintf($this->translate('The optional component %s has not been added. The component %s may have reduced functionalities'), $optionalComponent, $componentName));
477 477
                 }
478 478
             }
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
     {
486 486
         $components = $this->getComponents();
487 487
         
488
-        foreach ($components as $component){
488
+        foreach ($components as $component) {
489 489
             $component->onUpdate();
490 490
         }
491 491
         
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 
507 507
             if (substr($method, 0, strlen('include')) === 'include' && substr($method, -strlen('Set')) === 'Set') {
508 508
                 $incl = $method;
509
-                $classNameMethod = substr($method, strlen('include')) . 'ClassName';
509
+                $classNameMethod = substr($method, strlen('include')).'ClassName';
510 510
 
511 511
                 $classname = $this->$classNameMethod();
512 512
 
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 
521 521
                             if (class_exists($classname) && method_exists($this, $call)) {
522 522
                                 $set = $this->$call();
523
-                                $sql .= $mysqlbackend->setToSql($set) . "\n";
523
+                                $sql .= $mysqlbackend->setToSql($set)."\n";
524 524
                             }
525 525
                         }
526 526
                     }
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 
535 535
     public function includeBase()
536 536
     {
537
-        require_once APP_PHP_PATH . 'base.class.php';
537
+        require_once APP_PHP_PATH.'base.class.php';
538 538
     }
539 539
 
540 540
     /**
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
     public function getRecordSetByRef($recordClassname)
581 581
     {
582 582
         $recordClassname = str_replace($this->classPrefix, '', $recordClassname);
583
-        $classSet = $recordClassname . 'Set';
583
+        $classSet = $recordClassname.'Set';
584 584
         $set = $this->$classSet();
585 585
         return $set;
586 586
     }
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
         list($recordClassname, $id) = $refParts;
602 602
         $set = $this->getRecordSetByRef($recordClassname);
603 603
         if (isset($set)) {
604
-            if($noDefaultCriteria){
604
+            if ($noDefaultCriteria) {
605 605
                 $set->setDefaultCriteria(null);
606 606
             }
607 607
             return $set->get($id);
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
     {
621 621
         $fullClassName = get_class($record);
622 622
         list(, $className) = explode('_', $fullClassName);
623
-        return $className . ':' . $record->id;
623
+        return $className.':'.$record->id;
624 624
     }
625 625
 
626 626
 
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         
676 676
         //Then, check if current component has a translation
677 677
         if ($translation === $str) {
678
-            if($currentComponent = $this->getCurrentComponent()){
678
+            if ($currentComponent = $this->getCurrentComponent()) {
679 679
                 $translator->setAddonName($currentComponent->getPackageName());
680 680
                 $translator->setLangPath($currentComponent->getLangPath());
681 681
                 $translation = $translator->translate($str, $str_plurals, $number);
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
         }
685 685
         //Then, check if libapp has a translation
686 686
         if ($translation === $str) { 
687
-            $translator->setLangPath(null);//Reset lang path
687
+            $translator->setLangPath(null); //Reset lang path
688 688
             $translator->setAddonName('libapp');
689 689
             $translation = $translator->translate($str, $str_plurals, $number);
690 690
         }
@@ -732,16 +732,16 @@  discard block
 block discarded – undo
732 732
      */
733 733
     public function mailTo($addr, $subject = null, $body = null)
734 734
     {
735
-        $mailTo = 'mailto:' . $addr;
735
+        $mailTo = 'mailto:'.$addr;
736 736
         $parameters = array();
737 737
         if (isset($subject)) {
738
-            $parameters[] = 'subject=' . $subject;
738
+            $parameters[] = 'subject='.$subject;
739 739
         }
740 740
         if (isset($body)) {
741
-            $parameters[] = 'body=' . $body;
741
+            $parameters[] = 'body='.$body;
742 742
         }
743 743
         if (!empty($parameters)) {
744
-            $mailTo .= '?' . implode('&', $parameters);
744
+            $mailTo .= '?'.implode('&', $parameters);
745 745
         }
746 746
 
747 747
         return $mailTo;
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
         }
793 793
 
794 794
         $number = number_format($number, $decimals, ',', ' ');
795
-        return str_replace(' ', bab_nbsp(), $number . ' ' . $prefix . $unitSymbol);
795
+        return str_replace(' ', bab_nbsp(), $number.' '.$prefix.$unitSymbol);
796 796
     }
797 797
 
798 798
 
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
         }
813 813
 
814 814
         if (!isset($format)) {
815
-            $format = \bab_registry::get('/' . $this->addonName . '/numberFormat', $PhoneNumber->getDefaultFormat());
815
+            $format = \bab_registry::get('/'.$this->addonName.'/numberFormat', $PhoneNumber->getDefaultFormat());
816 816
         }
817 817
         $phoneNumberUtil = $PhoneNumber->PhoneNumberUtil();
818 818
 
@@ -854,12 +854,12 @@  discard block
 block discarded – undo
854 854
         $rc = new \ReflectionClass($this);
855 855
         $namespace = $rc->getNamespaceName();
856 856
         $prefix = '';
857
-        if(!empty($namespace)){
857
+        if (!empty($namespace)) {
858 858
             $namespaces = explode('\\', $namespace);
859 859
             $prefix = $namespaces[0].'\\'.$namespaces[1].'\Ctrl\\';
860 860
         }
861 861
         $this->includeController();
862
-        return bab_getInstance($prefix.$this->classPrefix . 'Controller')->setApp($this);
862
+        return bab_getInstance($prefix.$this->classPrefix.'Controller')->setApp($this);
863 863
     }
864 864
 
865 865
 
@@ -900,12 +900,12 @@  discard block
 block discarded – undo
900 900
         $rc = new \ReflectionClass($this);
901 901
         $namespace = $rc->getNamespaceName();
902 902
         $prefix = '';
903
-        if(!empty($namespace)){
903
+        if (!empty($namespace)) {
904 904
             $namespaces = explode('\\', $namespace);
905 905
             $prefix = $namespaces[0].'\\'.$namespaces[1].'\Ui\\';
906 906
         }
907 907
         $this->includeUi();
908
-        return bab_getInstance($prefix.$this->classPrefix . 'Ui')->setApp($this);
908
+        return bab_getInstance($prefix.$this->classPrefix.'Ui')->setApp($this);
909 909
     }
910 910
 
911 911
     /**
@@ -933,38 +933,38 @@  discard block
 block discarded – undo
933 933
 
934 934
             case substr($name, -strlen('SetClassName')) === 'SetClassName':
935 935
                 $className = substr($name, 0, strlen($name) - strlen('SetClassName'));
936
-                if($component = $this->getComponentByName($className)){
936
+                if ($component = $this->getComponentByName($className)) {
937 937
                     return $component->getSetClassName();
938 938
                 }
939 939
                 $setName = $className.'Set';
940
-                return $this->classPrefix . $setName;
940
+                return $this->classPrefix.$setName;
941 941
 
942 942
             case substr($name, -strlen('ClassName')) === 'ClassName':
943 943
                 $recordName = substr($name, 0, strlen($name) - strlen('ClassName'));
944
-                if($component = $this->getComponentByName($recordName)){
944
+                if ($component = $this->getComponentByName($recordName)) {
945 945
                     return $component->getRecordClassName();
946 946
                 }
947
-                return $this->classPrefix . $recordName;
947
+                return $this->classPrefix.$recordName;
948 948
 
949 949
             case substr($name, 0, strlen('include')) === 'include' && substr($name, -strlen('Set')) === 'Set':
950 950
                 $fileNameBase = strtolower(substr(substr($name, 0, strlen($name) - strlen('Set')), strlen('include')));
951
-                if($this->getComponentByName($fileNameBase)){
951
+                if ($this->getComponentByName($fileNameBase)) {
952 952
                     return;
953 953
                 }
954
-                $path = APP_SET_PATH . $fileNameBase . '.class.php';
955
-                if(is_file($path)){
954
+                $path = APP_SET_PATH.$fileNameBase.'.class.php';
955
+                if (is_file($path)) {
956 956
                     require_once $path;
957 957
                 }
958 958
                 return;
959 959
 
960 960
             case substr($name, -strlen('Set')) === 'Set':
961
-                if($component = $this->getComponentByName(substr($name, 0, strlen($name) -strlen('Set')))){
961
+                if ($component = $this->getComponentByName(substr($name, 0, strlen($name) - strlen('Set')))) {
962 962
                     return $component->recordSet();
963 963
                 }
964 964
  
965
-                $includeMethod = 'include' . $name;
965
+                $includeMethod = 'include'.$name;
966 966
                 $this->$includeMethod();
967
-                $setClassNameMethod = $name . 'ClassName';
967
+                $setClassNameMethod = $name.'ClassName';
968 968
                 $className = $this->$setClassNameMethod();
969 969
                 $set = new $className($this);
970 970
                 return $set;
@@ -972,8 +972,8 @@  discard block
 block discarded – undo
972 972
             case ($component = $this->getComponentByName($name)) != false:
973 973
                 return $component;
974 974
             default:
975
-                $setName = $name . 'Set';
976
-                $recordClassNameMethod = $name . 'ClassName';
975
+                $setName = $name.'Set';
976
+                $recordClassNameMethod = $name.'ClassName';
977 977
                 $recordClassName = $this->$recordClassNameMethod();
978 978
                 if (isset($arguments[0])) {
979 979
                     if ($arguments[0] instanceof $recordClassName) {
@@ -987,38 +987,38 @@  discard block
 block discarded – undo
987 987
     }
988 988
     
989 989
 
990
-    public function LinkSet(){
990
+    public function LinkSet() {
991 991
         return $this->AppLinkSet();
992 992
     }
993
-    public function AppLinkSet(){
993
+    public function AppLinkSet() {
994 994
         return new AppLinkSet($this);
995 995
     }
996 996
 
997
-    public function CustomFieldSet(){
997
+    public function CustomFieldSet() {
998 998
         return $this->AppCustomFieldSet();
999 999
     }
1000
-    public function AppCustomFieldSet(){
1000
+    public function AppCustomFieldSet() {
1001 1001
         return new AppCustomFieldSet($this);
1002 1002
     }
1003 1003
 
1004
-    public function CustomContainerSet(){
1004
+    public function CustomContainerSet() {
1005 1005
         return $this->AppCustomContainerSet();
1006 1006
     }
1007
-    public function AppCustomContainerSet(){
1007
+    public function AppCustomContainerSet() {
1008 1008
         return new AppCustomContainerSet($this);
1009 1009
     }
1010 1010
 
1011
-    public function CustomSectionSet(){
1011
+    public function CustomSectionSet() {
1012 1012
         return $this->AppCustomSectionSet();
1013 1013
     }
1014
-    public function AppCustomSectionSet(){
1014
+    public function AppCustomSectionSet() {
1015 1015
         return new AppCustomSectionSet($this);
1016 1016
     }
1017 1017
 
1018
-    public function LogSet(){
1018
+    public function LogSet() {
1019 1019
         return $this->AppLogSet();
1020 1020
     }
1021
-    public function AppLogSet(){
1021
+    public function AppLogSet() {
1022 1022
         return new AppLogSet($this);
1023 1023
     }
1024 1024
     
Please login to merge, or discard this patch.
vendor/composer/autoload_static.php 1 patch
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -6,108 +6,108 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59
8 8
 {
9
-    public static $files = array (
10
-        '0a77660cba4285786b5e8fa0300a9ed0' => __DIR__ . '/../..' . '/programs/Ui/AppHelpers.php',
11
-        '5932da661cc3b0ee915d192fd39ce96c' => __DIR__ . '/../..' . '/programs/Ui/AppTableModelView.php',
9
+    public static $files = array(
10
+        '0a77660cba4285786b5e8fa0300a9ed0' => __DIR__.'/../..'.'/programs/Ui/AppHelpers.php',
11
+        '5932da661cc3b0ee915d192fd39ce96c' => __DIR__.'/../..'.'/programs/Ui/AppTableModelView.php',
12 12
     );
13 13
 
14
-    public static $prefixLengthsPsr4 = array (
14
+    public static $prefixLengthsPsr4 = array(
15 15
         'C' => 
16
-        array (
16
+        array(
17 17
             'Capwelton\\LibApp\\' => 17,
18 18
         ),
19 19
     );
20 20
 
21
-    public static $prefixDirsPsr4 = array (
21
+    public static $prefixDirsPsr4 = array(
22 22
         'Capwelton\\LibApp\\' => 
23
-        array (
24
-            0 => __DIR__ . '/../..' . '/programs',
23
+        array(
24
+            0 => __DIR__.'/../..'.'/programs',
25 25
         ),
26 26
     );
27 27
 
28
-    public static $classMap = array (
29
-        'Capwelton\\LibApp\\AppAccessManager' => __DIR__ . '/../..' . '/programs/AppAccessManager.php',
30
-        'Capwelton\\LibApp\\AppComponent' => __DIR__ . '/../..' . '/programs/AppComponent.php',
31
-        'Capwelton\\LibApp\\AppObject' => __DIR__ . '/../..' . '/programs/AppObject.php',
32
-        'Capwelton\\LibApp\\AppObjectInterface' => __DIR__ . '/../..' . '/programs/AppObjectInterface.php',
33
-        'Capwelton\\LibApp\\AppUiObject' => __DIR__ . '/../..' . '/programs/AppUiObject.php',
34
-        'Capwelton\\LibApp\\Ctrl\\AppComponentCtrlRecord' => __DIR__ . '/../..' . '/programs/Ctrl/AppComponentCtrlRecord.php',
35
-        'Capwelton\\LibApp\\Ctrl\\AppController' => __DIR__ . '/../..' . '/programs/Ctrl/AppController.php',
36
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlAddonConfiguration' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlAddonConfiguration.php',
37
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlConfiguration' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlConfiguration.php',
38
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomContainer' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlCustomContainer.php',
39
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomField' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlCustomField.php',
40
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomSection' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlCustomSection.php',
41
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlNotification' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlNotification.php',
42
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlRecord' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlRecord.php',
43
-        'Capwelton\\LibApp\\Ctrl\\AppCtrlSSE' => __DIR__ . '/../..' . '/programs/Ctrl/AppCtrlSSE.php',
44
-        'Capwelton\\LibApp\\Exceptions\\AppAccessException' => __DIR__ . '/../..' . '/programs/Exceptions/AppAccessException.php',
45
-        'Capwelton\\LibApp\\Exceptions\\AppDeletedRecordException' => __DIR__ . '/../..' . '/programs/Exceptions/AppDeletedRecordException.php',
46
-        'Capwelton\\LibApp\\Exceptions\\AppEmptyResultException' => __DIR__ . '/../..' . '/programs/Exceptions/AppEmptyResultException.php',
47
-        'Capwelton\\LibApp\\Exceptions\\AppException' => __DIR__ . '/../..' . '/programs/Exceptions/AppException.php',
48
-        'Capwelton\\LibApp\\Exceptions\\AppNotFoundException' => __DIR__ . '/../..' . '/programs/Exceptions/AppNotFoundException.php',
49
-        'Capwelton\\LibApp\\Exceptions\\AppSaveException' => __DIR__ . '/../..' . '/programs/Exceptions/AppSaveException.php',
50
-        'Capwelton\\LibApp\\Exceptions\\AppUnknownActionException' => __DIR__ . '/../..' . '/programs/Exceptions/AppUnknownActionException.php',
51
-        'Capwelton\\LibApp\\Func_App' => __DIR__ . '/../..' . '/programs/Func_App.php',
52
-        'Capwelton\\LibApp\\Interfaces\\AppComponentDefinition' => __DIR__ . '/../..' . '/programs/Interfaces/AppComponentDefinition.php',
53
-        'Capwelton\\LibApp\\Interfaces\\AppComponentUi' => __DIR__ . '/../..' . '/programs/Interfaces/AppComponentUi.php',
54
-        'Capwelton\\LibApp\\Interfaces\\AppCtrlRecordInterface' => __DIR__ . '/../..' . '/programs/Interfaces/AppCtrlRecordInterface.php',
55
-        'Capwelton\\LibApp\\Portlet\\AppPortlet' => __DIR__ . '/../..' . '/programs/Portlet/AppPortlet.php',
56
-        'Capwelton\\LibApp\\Portlet\\AppPortletDefinition' => __DIR__ . '/../..' . '/programs/Portlet/AppPortletDefinition.php',
57
-        'Capwelton\\LibApp\\Portlet\\AppPortletUi' => __DIR__ . '/../..' . '/programs/Portlet/AppPortletUi.php',
58
-        'Capwelton\\LibApp\\Portlet\\Func_PortletBackend_App' => __DIR__ . '/../..' . '/programs/Portlet/Func_PortletBackend_App.php',
59
-        'Capwelton\\LibApp\\Portlet\\Notifications\\AppPortletDefinitionNotifications' => __DIR__ . '/../..' . '/programs/Portlet/Notifications/AppPortletDefinitionNotifications.php',
60
-        'Capwelton\\LibApp\\Portlet\\Notifications\\AppPortletUiNotifications' => __DIR__ . '/../..' . '/programs/Portlet/Notifications/AppPortletUiNotifications.php',
61
-        'Capwelton\\LibApp\\Set\\AppCustomContainer' => __DIR__ . '/../..' . '/programs/Set/AppCustomContainer.php',
62
-        'Capwelton\\LibApp\\Set\\AppCustomContainerSet' => __DIR__ . '/../..' . '/programs/Set/AppCustomContainerSet.php',
63
-        'Capwelton\\LibApp\\Set\\AppCustomField' => __DIR__ . '/../..' . '/programs/Set/AppCustomField.php',
64
-        'Capwelton\\LibApp\\Set\\AppCustomFieldSet' => __DIR__ . '/../..' . '/programs/Set/AppCustomFieldSet.php',
65
-        'Capwelton\\LibApp\\Set\\AppCustomSection' => __DIR__ . '/../..' . '/programs/Set/AppCustomSection.php',
66
-        'Capwelton\\LibApp\\Set\\AppCustomSectionSet' => __DIR__ . '/../..' . '/programs/Set/AppCustomSectionSet.php',
67
-        'Capwelton\\LibApp\\Set\\AppLink' => __DIR__ . '/../..' . '/programs/Set/AppLink.php',
68
-        'Capwelton\\LibApp\\Set\\AppLinkSet' => __DIR__ . '/../..' . '/programs/Set/AppLinkSet.php',
69
-        'Capwelton\\LibApp\\Set\\AppLog' => __DIR__ . '/../..' . '/programs/Set/AppLog.php',
70
-        'Capwelton\\LibApp\\Set\\AppLogSet' => __DIR__ . '/../..' . '/programs/Set/AppLogSet.php',
71
-        'Capwelton\\LibApp\\Set\\AppNotification' => __DIR__ . '/../..' . '/programs/Set/AppNotification.php',
72
-        'Capwelton\\LibApp\\Set\\AppNotificationSet' => __DIR__ . '/../..' . '/programs/Set/AppNotificationSet.php',
73
-        'Capwelton\\LibApp\\Set\\AppRecord' => __DIR__ . '/../..' . '/programs/Set/AppRecord.php',
74
-        'Capwelton\\LibApp\\Set\\AppRecordSet' => __DIR__ . '/../..' . '/programs/Set/AppRecordSet.php',
75
-        'Capwelton\\LibApp\\Set\\AppRole' => __DIR__ . '/../..' . '/programs/Set/AppRole.php',
76
-        'Capwelton\\LibApp\\Set\\AppRoleAccess' => __DIR__ . '/../..' . '/programs/Set/AppRoleAccess.php',
77
-        'Capwelton\\LibApp\\Set\\AppRoleAccessSet' => __DIR__ . '/../..' . '/programs/Set/AppRoleAccessSet.php',
78
-        'Capwelton\\LibApp\\Set\\AppRoleSet' => __DIR__ . '/../..' . '/programs/Set/AppRoleSet.php',
79
-        'Capwelton\\LibApp\\Set\\AppSSE' => __DIR__ . '/../..' . '/programs/Set/AppSSE.php',
80
-        'Capwelton\\LibApp\\Set\\AppSSESet' => __DIR__ . '/../..' . '/programs/Set/AppSSESet.php',
81
-        'Capwelton\\LibApp\\Set\\AppTraceableRecord' => __DIR__ . '/../..' . '/programs/Set/AppTraceableRecord.php',
82
-        'Capwelton\\LibApp\\Set\\AppTraceableRecordSet' => __DIR__ . '/../..' . '/programs/Set/AppTraceableRecordSet.php',
83
-        'Capwelton\\LibApp\\Set\\RecordAfterSaveEvent' => __DIR__ . '/../..' . '/programs/Set/RecordAfterSaveEvent.php',
84
-        'Capwelton\\LibApp\\Set\\RecordBeforeSaveEvent' => __DIR__ . '/../..' . '/programs/Set/RecordBeforeSaveEvent.php',
85
-        'Capwelton\\LibApp\\Ui\\AppCardFrame' => __DIR__ . '/../..' . '/programs/Ui/AppCardFrame.php',
86
-        'Capwelton\\LibApp\\Ui\\AppCriteriaEditor' => __DIR__ . '/../..' . '/programs/Ui/AppCriteriaEditor.php',
87
-        'Capwelton\\LibApp\\Ui\\AppCustomFieldEditor' => __DIR__ . '/../..' . '/programs/Ui/AppCustomFieldEditor.php',
88
-        'Capwelton\\LibApp\\Ui\\AppCustomFieldTableView' => __DIR__ . '/../..' . '/programs/Ui/AppCustomFieldTableView.php',
89
-        'Capwelton\\LibApp\\Ui\\AppEditor' => __DIR__ . '/../..' . '/programs/Ui/AppEditor.php',
90
-        'Capwelton\\LibApp\\Ui\\AppExportSelectEditor' => __DIR__ . '/../..' . '/programs/Ui/AppExportSelectEditor.php',
91
-        'Capwelton\\LibApp\\Ui\\AppRecordEditor' => __DIR__ . '/../..' . '/programs/Ui/AppRecordEditor.php',
92
-        'Capwelton\\LibApp\\Ui\\AppRecordFrame' => __DIR__ . '/../..' . '/programs/Ui/AppRecordFrame.php',
93
-        'Capwelton\\LibApp\\Ui\\AppRecordView' => __DIR__ . '/../..' . '/programs/Ui/AppRecordView.php',
94
-        'Capwelton\\LibApp\\Ui\\AppTableModelView' => __DIR__ . '/../..' . '/programs/Ui/AppTableModelView.php',
95
-        'Capwelton\\LibApp\\Ui\\AppTableModelViewColumnSettingsEditor' => __DIR__ . '/../..' . '/programs/Ui/AppTableModelViewColumnSettingsEditor.php',
96
-        'Capwelton\\LibApp\\Ui\\AppToolbar' => __DIR__ . '/../..' . '/programs/Ui/AppToolbar.php',
97
-        'Capwelton\\LibApp\\Ui\\AppUi' => __DIR__ . '/../..' . '/programs/Ui/AppUi.php',
98
-        'Capwelton\\LibApp\\Ui\\Items\\AppChip' => __DIR__ . '/../..' . '/programs/Ui/Items/AppChip.php',
99
-        'Capwelton\\LibApp\\Ui\\Items\\AppShape' => __DIR__ . '/../..' . '/programs/Ui/Items/AppShape.php',
100
-        'Capwelton\\LibApp\\Ui\\Items\\AppShapeCircle' => __DIR__ . '/../..' . '/programs/Ui/Items/AppShapeCircle.php',
101
-        'Capwelton\\LibApp\\Ui\\Items\\AppShapeSquare' => __DIR__ . '/../..' . '/programs/Ui/Items/AppShapeSquare.php',
102
-        'Capwelton\\LibApp\\Ui\\Items\\AppShapeTriangle' => __DIR__ . '/../..' . '/programs/Ui/Items/AppShapeTriangle.php',
103
-        'Capwelton\\LibApp\\Ui\\Page\\AppErrorPage' => __DIR__ . '/../..' . '/programs/Ui/Page/AppErrorPage.php',
104
-        'Capwelton\\LibApp\\Ui\\Page\\AppPage' => __DIR__ . '/../..' . '/programs/Ui/Page/AppPage.php',
105
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
28
+    public static $classMap = array(
29
+        'Capwelton\\LibApp\\AppAccessManager' => __DIR__.'/../..'.'/programs/AppAccessManager.php',
30
+        'Capwelton\\LibApp\\AppComponent' => __DIR__.'/../..'.'/programs/AppComponent.php',
31
+        'Capwelton\\LibApp\\AppObject' => __DIR__.'/../..'.'/programs/AppObject.php',
32
+        'Capwelton\\LibApp\\AppObjectInterface' => __DIR__.'/../..'.'/programs/AppObjectInterface.php',
33
+        'Capwelton\\LibApp\\AppUiObject' => __DIR__.'/../..'.'/programs/AppUiObject.php',
34
+        'Capwelton\\LibApp\\Ctrl\\AppComponentCtrlRecord' => __DIR__.'/../..'.'/programs/Ctrl/AppComponentCtrlRecord.php',
35
+        'Capwelton\\LibApp\\Ctrl\\AppController' => __DIR__.'/../..'.'/programs/Ctrl/AppController.php',
36
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlAddonConfiguration' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlAddonConfiguration.php',
37
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlConfiguration' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlConfiguration.php',
38
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomContainer' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlCustomContainer.php',
39
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomField' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlCustomField.php',
40
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlCustomSection' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlCustomSection.php',
41
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlNotification' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlNotification.php',
42
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlRecord' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlRecord.php',
43
+        'Capwelton\\LibApp\\Ctrl\\AppCtrlSSE' => __DIR__.'/../..'.'/programs/Ctrl/AppCtrlSSE.php',
44
+        'Capwelton\\LibApp\\Exceptions\\AppAccessException' => __DIR__.'/../..'.'/programs/Exceptions/AppAccessException.php',
45
+        'Capwelton\\LibApp\\Exceptions\\AppDeletedRecordException' => __DIR__.'/../..'.'/programs/Exceptions/AppDeletedRecordException.php',
46
+        'Capwelton\\LibApp\\Exceptions\\AppEmptyResultException' => __DIR__.'/../..'.'/programs/Exceptions/AppEmptyResultException.php',
47
+        'Capwelton\\LibApp\\Exceptions\\AppException' => __DIR__.'/../..'.'/programs/Exceptions/AppException.php',
48
+        'Capwelton\\LibApp\\Exceptions\\AppNotFoundException' => __DIR__.'/../..'.'/programs/Exceptions/AppNotFoundException.php',
49
+        'Capwelton\\LibApp\\Exceptions\\AppSaveException' => __DIR__.'/../..'.'/programs/Exceptions/AppSaveException.php',
50
+        'Capwelton\\LibApp\\Exceptions\\AppUnknownActionException' => __DIR__.'/../..'.'/programs/Exceptions/AppUnknownActionException.php',
51
+        'Capwelton\\LibApp\\Func_App' => __DIR__.'/../..'.'/programs/Func_App.php',
52
+        'Capwelton\\LibApp\\Interfaces\\AppComponentDefinition' => __DIR__.'/../..'.'/programs/Interfaces/AppComponentDefinition.php',
53
+        'Capwelton\\LibApp\\Interfaces\\AppComponentUi' => __DIR__.'/../..'.'/programs/Interfaces/AppComponentUi.php',
54
+        'Capwelton\\LibApp\\Interfaces\\AppCtrlRecordInterface' => __DIR__.'/../..'.'/programs/Interfaces/AppCtrlRecordInterface.php',
55
+        'Capwelton\\LibApp\\Portlet\\AppPortlet' => __DIR__.'/../..'.'/programs/Portlet/AppPortlet.php',
56
+        'Capwelton\\LibApp\\Portlet\\AppPortletDefinition' => __DIR__.'/../..'.'/programs/Portlet/AppPortletDefinition.php',
57
+        'Capwelton\\LibApp\\Portlet\\AppPortletUi' => __DIR__.'/../..'.'/programs/Portlet/AppPortletUi.php',
58
+        'Capwelton\\LibApp\\Portlet\\Func_PortletBackend_App' => __DIR__.'/../..'.'/programs/Portlet/Func_PortletBackend_App.php',
59
+        'Capwelton\\LibApp\\Portlet\\Notifications\\AppPortletDefinitionNotifications' => __DIR__.'/../..'.'/programs/Portlet/Notifications/AppPortletDefinitionNotifications.php',
60
+        'Capwelton\\LibApp\\Portlet\\Notifications\\AppPortletUiNotifications' => __DIR__.'/../..'.'/programs/Portlet/Notifications/AppPortletUiNotifications.php',
61
+        'Capwelton\\LibApp\\Set\\AppCustomContainer' => __DIR__.'/../..'.'/programs/Set/AppCustomContainer.php',
62
+        'Capwelton\\LibApp\\Set\\AppCustomContainerSet' => __DIR__.'/../..'.'/programs/Set/AppCustomContainerSet.php',
63
+        'Capwelton\\LibApp\\Set\\AppCustomField' => __DIR__.'/../..'.'/programs/Set/AppCustomField.php',
64
+        'Capwelton\\LibApp\\Set\\AppCustomFieldSet' => __DIR__.'/../..'.'/programs/Set/AppCustomFieldSet.php',
65
+        'Capwelton\\LibApp\\Set\\AppCustomSection' => __DIR__.'/../..'.'/programs/Set/AppCustomSection.php',
66
+        'Capwelton\\LibApp\\Set\\AppCustomSectionSet' => __DIR__.'/../..'.'/programs/Set/AppCustomSectionSet.php',
67
+        'Capwelton\\LibApp\\Set\\AppLink' => __DIR__.'/../..'.'/programs/Set/AppLink.php',
68
+        'Capwelton\\LibApp\\Set\\AppLinkSet' => __DIR__.'/../..'.'/programs/Set/AppLinkSet.php',
69
+        'Capwelton\\LibApp\\Set\\AppLog' => __DIR__.'/../..'.'/programs/Set/AppLog.php',
70
+        'Capwelton\\LibApp\\Set\\AppLogSet' => __DIR__.'/../..'.'/programs/Set/AppLogSet.php',
71
+        'Capwelton\\LibApp\\Set\\AppNotification' => __DIR__.'/../..'.'/programs/Set/AppNotification.php',
72
+        'Capwelton\\LibApp\\Set\\AppNotificationSet' => __DIR__.'/../..'.'/programs/Set/AppNotificationSet.php',
73
+        'Capwelton\\LibApp\\Set\\AppRecord' => __DIR__.'/../..'.'/programs/Set/AppRecord.php',
74
+        'Capwelton\\LibApp\\Set\\AppRecordSet' => __DIR__.'/../..'.'/programs/Set/AppRecordSet.php',
75
+        'Capwelton\\LibApp\\Set\\AppRole' => __DIR__.'/../..'.'/programs/Set/AppRole.php',
76
+        'Capwelton\\LibApp\\Set\\AppRoleAccess' => __DIR__.'/../..'.'/programs/Set/AppRoleAccess.php',
77
+        'Capwelton\\LibApp\\Set\\AppRoleAccessSet' => __DIR__.'/../..'.'/programs/Set/AppRoleAccessSet.php',
78
+        'Capwelton\\LibApp\\Set\\AppRoleSet' => __DIR__.'/../..'.'/programs/Set/AppRoleSet.php',
79
+        'Capwelton\\LibApp\\Set\\AppSSE' => __DIR__.'/../..'.'/programs/Set/AppSSE.php',
80
+        'Capwelton\\LibApp\\Set\\AppSSESet' => __DIR__.'/../..'.'/programs/Set/AppSSESet.php',
81
+        'Capwelton\\LibApp\\Set\\AppTraceableRecord' => __DIR__.'/../..'.'/programs/Set/AppTraceableRecord.php',
82
+        'Capwelton\\LibApp\\Set\\AppTraceableRecordSet' => __DIR__.'/../..'.'/programs/Set/AppTraceableRecordSet.php',
83
+        'Capwelton\\LibApp\\Set\\RecordAfterSaveEvent' => __DIR__.'/../..'.'/programs/Set/RecordAfterSaveEvent.php',
84
+        'Capwelton\\LibApp\\Set\\RecordBeforeSaveEvent' => __DIR__.'/../..'.'/programs/Set/RecordBeforeSaveEvent.php',
85
+        'Capwelton\\LibApp\\Ui\\AppCardFrame' => __DIR__.'/../..'.'/programs/Ui/AppCardFrame.php',
86
+        'Capwelton\\LibApp\\Ui\\AppCriteriaEditor' => __DIR__.'/../..'.'/programs/Ui/AppCriteriaEditor.php',
87
+        'Capwelton\\LibApp\\Ui\\AppCustomFieldEditor' => __DIR__.'/../..'.'/programs/Ui/AppCustomFieldEditor.php',
88
+        'Capwelton\\LibApp\\Ui\\AppCustomFieldTableView' => __DIR__.'/../..'.'/programs/Ui/AppCustomFieldTableView.php',
89
+        'Capwelton\\LibApp\\Ui\\AppEditor' => __DIR__.'/../..'.'/programs/Ui/AppEditor.php',
90
+        'Capwelton\\LibApp\\Ui\\AppExportSelectEditor' => __DIR__.'/../..'.'/programs/Ui/AppExportSelectEditor.php',
91
+        'Capwelton\\LibApp\\Ui\\AppRecordEditor' => __DIR__.'/../..'.'/programs/Ui/AppRecordEditor.php',
92
+        'Capwelton\\LibApp\\Ui\\AppRecordFrame' => __DIR__.'/../..'.'/programs/Ui/AppRecordFrame.php',
93
+        'Capwelton\\LibApp\\Ui\\AppRecordView' => __DIR__.'/../..'.'/programs/Ui/AppRecordView.php',
94
+        'Capwelton\\LibApp\\Ui\\AppTableModelView' => __DIR__.'/../..'.'/programs/Ui/AppTableModelView.php',
95
+        'Capwelton\\LibApp\\Ui\\AppTableModelViewColumnSettingsEditor' => __DIR__.'/../..'.'/programs/Ui/AppTableModelViewColumnSettingsEditor.php',
96
+        'Capwelton\\LibApp\\Ui\\AppToolbar' => __DIR__.'/../..'.'/programs/Ui/AppToolbar.php',
97
+        'Capwelton\\LibApp\\Ui\\AppUi' => __DIR__.'/../..'.'/programs/Ui/AppUi.php',
98
+        'Capwelton\\LibApp\\Ui\\Items\\AppChip' => __DIR__.'/../..'.'/programs/Ui/Items/AppChip.php',
99
+        'Capwelton\\LibApp\\Ui\\Items\\AppShape' => __DIR__.'/../..'.'/programs/Ui/Items/AppShape.php',
100
+        'Capwelton\\LibApp\\Ui\\Items\\AppShapeCircle' => __DIR__.'/../..'.'/programs/Ui/Items/AppShapeCircle.php',
101
+        'Capwelton\\LibApp\\Ui\\Items\\AppShapeSquare' => __DIR__.'/../..'.'/programs/Ui/Items/AppShapeSquare.php',
102
+        'Capwelton\\LibApp\\Ui\\Items\\AppShapeTriangle' => __DIR__.'/../..'.'/programs/Ui/Items/AppShapeTriangle.php',
103
+        'Capwelton\\LibApp\\Ui\\Page\\AppErrorPage' => __DIR__.'/../..'.'/programs/Ui/Page/AppErrorPage.php',
104
+        'Capwelton\\LibApp\\Ui\\Page\\AppPage' => __DIR__.'/../..'.'/programs/Ui/Page/AppPage.php',
105
+        'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php',
106 106
     );
107 107
 
108 108
     public static function getInitializer(ClassLoader $loader)
109 109
     {
110
-        return \Closure::bind(function () use ($loader) {
110
+        return \Closure::bind(function() use ($loader) {
111 111
             $loader->prefixLengthsPsr4 = ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59::$prefixLengthsPsr4;
112 112
             $loader->prefixDirsPsr4 = ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59::$prefixDirsPsr4;
113 113
             $loader->classMap = ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59::$classMap;
Please login to merge, or discard this patch.
vendor/composer/autoload_real.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     public static function loadClassLoader($class)
10 10
     {
11 11
         if ('Composer\Autoload\ClassLoader' === $class) {
12
-            require __DIR__ . '/ClassLoader.php';
12
+            require __DIR__.'/ClassLoader.php';
13 13
         }
14 14
     }
15 15
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             return self::$loader;
23 23
         }
24 24
 
25
-        require __DIR__ . '/platform_check.php';
25
+        require __DIR__.'/platform_check.php';
26 26
 
27 27
         spl_autoload_register(array('ComposerAutoloaderInit0aaa67be5f7bedbc88eff25aa142ea59', 'loadClassLoader'), true, true);
28 28
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
 
31 31
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32 32
         if ($useStaticLoader) {
33
-            require __DIR__ . '/autoload_static.php';
33
+            require __DIR__.'/autoload_static.php';
34 34
 
35 35
             call_user_func(\Composer\Autoload\ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59::getInitializer($loader));
36 36
         } else {
37
-            $map = require __DIR__ . '/autoload_namespaces.php';
37
+            $map = require __DIR__.'/autoload_namespaces.php';
38 38
             foreach ($map as $namespace => $path) {
39 39
                 $loader->set($namespace, $path);
40 40
             }
41 41
 
42
-            $map = require __DIR__ . '/autoload_psr4.php';
42
+            $map = require __DIR__.'/autoload_psr4.php';
43 43
             foreach ($map as $namespace => $path) {
44 44
                 $loader->setPsr4($namespace, $path);
45 45
             }
46 46
 
47
-            $classMap = require __DIR__ . '/autoload_classmap.php';
47
+            $classMap = require __DIR__.'/autoload_classmap.php';
48 48
             if ($classMap) {
49 49
                 $loader->addClassMap($classMap);
50 50
             }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         if ($useStaticLoader) {
56 56
             $includeFiles = Composer\Autoload\ComposerStaticInit0aaa67be5f7bedbc88eff25aa142ea59::$files;
57 57
         } else {
58
-            $includeFiles = require __DIR__ . '/autoload_files.php';
58
+            $includeFiles = require __DIR__.'/autoload_files.php';
59 59
         }
60 60
         foreach ($includeFiles as $fileIdentifier => $file) {
61 61
             composerRequire0aaa67be5f7bedbc88eff25aa142ea59($fileIdentifier, $file);
Please login to merge, or discard this patch.
vendor/composer/autoload_files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
-    '0a77660cba4285786b5e8fa0300a9ed0' => $baseDir . '/programs/Ui/AppHelpers.php',
10
-    '5932da661cc3b0ee915d192fd39ce96c' => $baseDir . '/programs/Ui/AppTableModelView.php',
9
+    '0a77660cba4285786b5e8fa0300a9ed0' => $baseDir.'/programs/Ui/AppHelpers.php',
10
+    '5932da661cc3b0ee915d192fd39ce96c' => $baseDir.'/programs/Ui/AppTableModelView.php',
11 11
 );
Please login to merge, or discard this patch.
programs/Ui/AppTableModelView.php 2 patches
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function initHeaderRow(ORMRecordSet $set)
100 100
     {
101
-        require_once $GLOBALS['babInstallPath'] . 'utilit/urlincl.php';
101
+        require_once $GLOBALS['babInstallPath'].'utilit/urlincl.php';
102 102
         
103 103
         \bab_functionality::includefile('Icons');
104 104
         
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
         
115 115
         $filterValues = $this->getFilterValues();
116 116
         
117
-        foreach ($this->visibleColumns as $columnPath => $column){
117
+        foreach ($this->visibleColumns as $columnPath => $column) {
118 118
             
119
-            if(! isset($this->columnsDescriptions[$columnPath])){
119
+            if (!isset($this->columnsDescriptions[$columnPath])) {
120 120
                 $this->columnsDescriptions[$columnPath] = $column->getDescription();
121 121
             }
122 122
             
@@ -128,61 +128,61 @@  discard block
 block discarded – undo
128 128
             
129 129
             $sizePolicy = 'widget-actions-target';
130 130
             
131
-            if($this->isMultiSelect() && $columnPath === '_select_'){
131
+            if ($this->isMultiSelect() && $columnPath === '_select_') {
132 132
                 $this->toggleCheckAllBox = $W->CheckBox();
133 133
                 $this->toggleCheckAllBox->setName('toggleCheckAllBox');
134 134
                 $this->toggleCheckAllBox->setTitle(widget_translate('Select all on page'));
135 135
                 $this->toggleCheckAllBox->setSizePolicy('condensed');
136 136
                 $this->toggleCheckAllBox->setCheckedValue(true);
137
-                if(isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && ! empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on'){
137
+                if (isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && !empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on') {
138 138
                     $this->toggleCheckAllBox->setValue(true);
139 139
                 }
140 140
                 $isSearchable = false;
141 141
                 $isSortable = false;
142 142
                 $columnItem = $W->FlexItems($this->toggleCheckAllBox);
143 143
             }
144
-            elseif(isset($this->sortParameterName) && self::getRecordSetField($set, $columnPath) && $isSortable){
145
-                if(! isset($this->sortBaseUrl)){
144
+            elseif (isset($this->sortParameterName) && self::getRecordSetField($set, $columnPath) && $isSortable) {
145
+                if (!isset($this->sortBaseUrl)) {
146 146
                     $this->sortBaseUrl = \bab_url::request_gp();
147 147
                 }
148 148
                 
149
-                if($this->sortField === $columnPath && $this->sortAscending){
149
+                if ($this->sortField === $columnPath && $this->sortAscending) {
150 150
                     $direction = ':down';
151 151
                 }
152
-                else{
152
+                else {
153 153
                     $direction = ':up';
154 154
                 }
155 155
                 
156
-                $url = \bab_url::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath . $direction);
157
-                if($anchor = $this->getAnchor()){
158
-                    $url .= '#' . urlencode($anchor);
156
+                $url = \bab_url::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath.$direction);
157
+                if ($anchor = $this->getAnchor()) {
158
+                    $url .= '#'.urlencode($anchor);
159 159
                 }
160 160
                 
161 161
                 $columnItem = $W->Link($W->FlexItems($W->Label($columnLabel), $W->Items()
162 162
                     ->addClass('widget-table-column-sorting-icons'))
163 163
                     ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_CONTENT_CENTER), $url)
164 164
                     ->addClass('widget-table-column-sorting-action');
165
-                if($this->sortAjaxAction){
166
-                    $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath . $direction), '');
165
+                if ($this->sortAjaxAction) {
166
+                    $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath.$direction), '');
167 167
                 }
168 168
                 $columnItem = $W->FlexItems($columnItem);
169 169
             }
170
-            else{
170
+            else {
171 171
                 $columnItem = $W->FlexItems($W->Label($columnLabel), $W->Label(''));
172 172
             }
173 173
             
174 174
             $columnItem->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_CONTENT_CENTER)->setJustifyContent(WidgetFlexLayout::FLEX_JUSTIFY_CONTENT_SPACE_BETWEEN);
175 175
             $columnItem->addClass('widget-table-column-header-item');
176 176
             
177
-            if(isset($columnIcon)){
177
+            if (isset($columnIcon)) {
178 178
                 $columnItem->addClass('icon', $columnIcon)->setSizePolicy(\Func_Icons::ICON_LEFT_16);
179 179
             }
180 180
             
181
-            if($isSortable){
181
+            if ($isSortable) {
182 182
                 $sizePolicy .= ' widget-table-column-sortable';
183 183
             }
184
-            if($isSearchable){
185
-                if(! isset($this->filterBaseUrl)){
184
+            if ($isSearchable) {
185
+                if (!isset($this->filterBaseUrl)) {
186 186
                     $this->filterBaseUrl = $this->getRecordControllerProxy()->displayListFilter();
187 187
                 }
188 188
                 $url = $this->filterBaseUrl;
@@ -193,24 +193,24 @@  discard block
 block discarded – undo
193 193
                     ->addClass('widget-table-column-search-action')
194 194
                     ->setDialogClass('box blue'), 0);
195 195
                 $sizePolicy .= ' widget-table-column-searchable';
196
-                if(isset($filterValues[$columnPath]) && ! empty($filterValues[$columnPath])){
196
+                if (isset($filterValues[$columnPath]) && !empty($filterValues[$columnPath])) {
197 197
                     $sizePolicy .= ' widget-table-column-searched';
198 198
                 }
199 199
             }
200 200
             $items = $W->Items()->setSizePolicy($sizePolicy);
201 201
             $items->addItem($columnItem);
202 202
             
203
-            $this->addItem($items, 0, $col ++);
203
+            $this->addItem($items, 0, $col++);
204 204
         }
205 205
     }
206 206
     
207 207
     protected function initRow($record, $row)
208 208
     {
209
-        if($this->highlightRows == null){
209
+        if ($this->highlightRows == null) {
210 210
             $this->highlightRows = $this->getHighlightedRows();
211 211
         }
212 212
         
213
-        if(in_array($record->id, $this->highlightRows)){
213
+        if (in_array($record->id, $this->highlightRows)) {
214 214
             $this->addRowClass($row, "app_highlightRow");
215 215
         }
216 216
         $this->addRowClass($row, "app_highlightAvailable");
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function App()
238 238
     {
239
-        if(! isset($this->app)){
239
+        if (!isset($this->app)) {
240 240
             // If the app object was not specified (through the setApp() method)
241 241
             // we try to select one according to the classname prefix.
242 242
             list ($prefix) = explode('_', get_class($this));
243 243
             $functionalityName = ucwords($prefix);
244
-            $this->app = @\bab_functionality::get('App/' . $functionalityName);
245
-            if(! $this->app){
244
+            $this->app = @\bab_functionality::get('App/'.$functionalityName);
245
+            if (!$this->app) {
246 246
                 $this->app = @\bab_functionality::get('App');
247 247
             }
248 248
         }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     {
254 254
         $customFields = $recordSet->getCustomFields();
255 255
         
256
-        foreach ($customFields as $customField){
256
+        foreach ($customFields as $customField) {
257 257
             $fieldname = $customField->fieldname;
258 258
             $this->addColumn(app_TableModelViewColumn($recordSet->$fieldname, $customField->name)->setSortable(true)
259 259
                 ->setExportable(true)
@@ -280,39 +280,39 @@  discard block
 block discarded – undo
280 280
         
281 281
         $filterPanel = $W->Filter();
282 282
         $filterPanel->setLayout($W->VBoxLayout());
283
-        if(isset($name)){
283
+        if (isset($name)) {
284 284
             $filterPanel->setName($name);
285 285
         }
286 286
         
287 287
         $pageLength = $this->getPageLength();
288
-        if(null === $pageLength){
288
+        if (null === $pageLength) {
289 289
             $pageLength = 15;
290 290
         }
291 291
         
292 292
         $pageNumber = $this->getCurrentPage();
293
-        if(null === $pageNumber){
293
+        if (null === $pageNumber) {
294 294
             $pageNumber = 0;
295 295
         }
296 296
         
297 297
         $this->setPageLength(isset($filter['pageSize']) ? $filter['pageSize'] : $pageLength);
298 298
         $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber);
299 299
         
300
-        if(isset($name)){
301
-            $this->sortParameterName = $name . '[filter][sort]';
300
+        if (isset($name)) {
301
+            $this->sortParameterName = $name.'[filter][sort]';
302 302
         }
303
-        else{
303
+        else {
304 304
             $this->sortParameterName = 'filter[sort]';
305 305
         }
306 306
         
307
-        if(isset($filter['sort'])){
307
+        if (isset($filter['sort'])) {
308 308
             $this->setSortField($filter['sort']);
309 309
         }
310
-        elseif(! isset($this->sortField)){
310
+        elseif (!isset($this->sortField)) {
311 311
             
312
-            if(method_exists($this, 'getDefaultSortField')){
312
+            if (method_exists($this, 'getDefaultSortField')) {
313 313
                 $this->setSortField($this->getDefaultSortField());
314 314
             }
315
-            else{
315
+            else {
316 316
                 $columns = $this->getVisibleColumns();
317 317
                 $sortField = key($columns);
318 318
                 $this->setSortField($sortField);
@@ -321,14 +321,14 @@  discard block
 block discarded – undo
321 321
         
322 322
         $form = $this->getFilterForm();
323 323
         
324
-        if(isset($filter)){
325
-            if(isset($name)){
324
+        if (isset($filter)) {
325
+            if (isset($name)) {
326 326
                 $path = array(
327 327
                     $name,
328 328
                     'filter'
329 329
                 );
330 330
             }
331
-            else{
331
+            else {
332 332
                 $path = array(
333 333
                     'filter'
334 334
                 );
@@ -354,19 +354,19 @@  discard block
 block discarded – undo
354 354
     
355 355
     protected function isFilterFieldSpecified($filter, $fieldPath)
356 356
     {
357
-        if(isset($filter[$fieldPath])){
357
+        if (isset($filter[$fieldPath])) {
358 358
             $value = $filter[$fieldPath];
359
-            if(is_array($value)){
360
-                foreach ($value as $val){
359
+            if (is_array($value)) {
360
+                foreach ($value as $val) {
361 361
                     $val = trim($val);
362
-                    if(! empty($val)){
362
+                    if (!empty($val)) {
363 363
                         return true;
364 364
                     }
365 365
                 }
366 366
                 return false;
367 367
             }
368 368
             
369
-            if(trim($value) !== ''){
369
+            if (trim($value) !== '') {
370 370
                 return true;
371 371
             }
372 372
         }
@@ -376,13 +376,13 @@  discard block
 block discarded – undo
376 376
     
377 377
     protected function handleFilterInputWidget($name, ORMField $field = null)
378 378
     {
379
-        if(null === $field){
379
+        if (null === $field) {
380 380
             return null;
381 381
         }
382 382
         
383 383
         $W = bab_Widgets();
384 384
         
385
-        if($field instanceof ORMFkField){
385
+        if ($field instanceof ORMFkField) {
386 386
             $widget = $W->Select();
387 387
             $widget->addOption('', '');
388 388
             
@@ -390,10 +390,10 @@  discard block
 block discarded – undo
390 390
             $setName = $field->getForeignSetName();
391 391
             
392 392
             $pos = strrpos($setName, '\\');
393
-            if($pos === false){
393
+            if ($pos === false) {
394 394
                 list (, $appSetName) = explode('_', $setName);
395 395
             }
396
-            else{
396
+            else {
397 397
                 list (, $appSetName) = array(
398 398
                     substr($setName, 0, $pos),
399 399
                     substr($setName, $pos + 1)
@@ -404,12 +404,12 @@  discard block
 block discarded – undo
404 404
             $set->setName($field->getName());
405 405
             $set->setDescription($field->getDescription());
406 406
             
407
-            if($set === null){
407
+            if ($set === null) {
408 408
                 return null;
409 409
             }
410 410
             
411 411
             $values = $set->select();
412
-            foreach ($values as $record){
412
+            foreach ($values as $record) {
413 413
                 $widget->addOption($record->id, (string) $record->name);
414 414
             }
415 415
             
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $displayAdvancedForm = $this->isAdvancedFormDisplayed();
493 493
         $advancedFiltersFrame = $W->VBoxItems($addFilterButton)->addClass('widget-instant-container');
494 494
             
495
-        if($displayAdvancedForm){
495
+        if ($displayAdvancedForm) {
496 496
             $filterBox = $W->FlowLayout()
497 497
                 ->addClass('widget-instant-form')
498 498
                 ->setHorizontalSpacing(2, 'em')
@@ -503,20 +503,20 @@  discard block
 block discarded – undo
503 503
         
504 504
         $columns = $this->getVisibleColumns();
505 505
         
506
-        foreach ($columns as $fieldName => $column){
506
+        foreach ($columns as $fieldName => $column) {
507 507
             $field = $column->getField();
508
-            if(! $column->isSearchable()){
508
+            if (!$column->isSearchable()) {
509 509
                 continue;
510 510
             }
511 511
             
512
-            if(! ($field instanceof ORMField)){
512
+            if (!($field instanceof ORMField)) {
513 513
                 $field = null;
514 514
             }
515 515
             
516 516
             $label = $this->handleFilterLabelWidget($fieldName, $field);
517 517
             $input = $this->handleFilterInputWidget($fieldName, $field);
518 518
             
519
-            if(isset($input) && isset($label)){
519
+            if (isset($input) && isset($label)) {
520 520
                 
521 521
                 $input->setName($fieldName);
522 522
                 $label->setAssociatedWidget($input);
@@ -526,11 +526,11 @@  discard block
 block discarded – undo
526 526
                 $formItem = $this->handleFilterLabel($label, $input);
527 527
                 
528 528
                 // $formItem = $W->Section($label->getText(), $input, 7)->setFoldable(true, true);
529
-                $formItem->addClass('compact', 'field_' . $fieldName);
529
+                $formItem->addClass('compact', 'field_'.$fieldName);
530 530
                 
531 531
                 $mainSearch = (method_exists($column, 'isMainSearch') && $column->isMainSearch());
532 532
                 
533
-                if($mainSearch || $this->isFilterFieldSpecified($filter, $column->getFieldPath())){
533
+                if ($mainSearch || $this->isFilterFieldSpecified($filter, $column->getFieldPath())) {
534 534
                     
535 535
                     $removeColumnsAction = $W->Action();
536 536
                     $removeColumnsAction->setMethod('addon/widgets/configurationstorage', 'removeFilter', array(
@@ -546,19 +546,19 @@  discard block
 block discarded – undo
546 546
                         ->addAttribute('data-removefor', $column->getFieldPath()))
547 547
                         ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_ITEMS_FLEX_END));
548 548
                 }
549
-                elseif($displayAdvancedForm){
549
+                elseif ($displayAdvancedForm) {
550 550
                     $formItem->setSizePolicy('col-lg-2 col-md-3 col-sm-6 col-xs-12');
551 551
                     $filterBox->addItem($formItem);
552 552
                 }
553 553
             }
554 554
         }
555 555
         
556
-        if(! $this->submit){
556
+        if (!$this->submit) {
557 557
             $this->submit = $W->SubmitButton();
558 558
             $this->submit->setLabel(Widget_translate('Apply filter'));
559 559
         }
560 560
         
561
-        if($controller = $this->getRecordController()){
561
+        if ($controller = $this->getRecordController()) {
562 562
             $proxy = $controller->proxy();
563 563
             $this->reset = $W->Link($App->translate('Reset'), $proxy->resetFilters())
564 564
                 ->addClass('icon', \Func_Icons::ACTIONS_VIEW_REFRESH, 'widget-actionbutton')
@@ -580,14 +580,14 @@  discard block
 block discarded – undo
580 580
             $this->filterMenu->addClass(\Func_Icons::ICON_LEFT_16);
581 581
             
582 582
             $filterNames = $controller->getFilterNames();
583
-            if(count($filterNames) > 0){
583
+            if (count($filterNames) > 0) {
584 584
                 // $this->select = $W->Menu(null, $W->VBoxItems());
585 585
                 // $this->select->setButtonClass('widget-link icon actions-list-filter');
586 586
                 // $this->select->setButtonLabel($App->translate('Saved filters'));
587 587
                 // $this->select->addClass(\Func_Icons::ICON_LEFT_16);
588 588
                 
589
-                foreach ($filterNames as $filterName){
590
-                    $filter = $W->getUserConfiguration($controller->getModelViewDefaultId() . '/filters/' . $filterName, 'widgets', false);
589
+                foreach ($filterNames as $filterName) {
590
+                    $filter = $W->getUserConfiguration($controller->getModelViewDefaultId().'/filters/'.$filterName, 'widgets', false);
591 591
                     
592 592
                     // $this->select->addItem(
593 593
                     // $W->Link(
@@ -660,39 +660,39 @@  discard block
 block discarded – undo
660 660
         
661 661
         $filterPanel = $W->Filter();
662 662
         $filterPanel->setLayout($W->VBoxLayout());
663
-        if(isset($name)){
663
+        if (isset($name)) {
664 664
             $filterPanel->setName($name);
665 665
         }
666 666
         
667 667
         $pageLength = $this->getPageLength();
668
-        if(null === $pageLength){
668
+        if (null === $pageLength) {
669 669
             $pageLength = 15;
670 670
         }
671 671
         
672 672
         $pageNumber = $this->getCurrentPage();
673
-        if(null === $pageNumber){
673
+        if (null === $pageNumber) {
674 674
             $pageNumber = 0;
675 675
         }
676 676
         
677 677
         $this->setPageLength(isset($filter['pageSize']) ? $filter['pageSize'] : $pageLength);
678 678
         // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber);
679 679
         
680
-        if(isset($name)){
681
-            $this->sortParameterName = $name . '[filter][sort]';
680
+        if (isset($name)) {
681
+            $this->sortParameterName = $name.'[filter][sort]';
682 682
         }
683
-        else{
683
+        else {
684 684
             $this->sortParameterName = 'filter[sort]';
685 685
         }
686 686
         
687
-        if(isset($filter['sort'])){
687
+        if (isset($filter['sort'])) {
688 688
             $this->setSortField($filter['sort']);
689 689
         }
690
-        elseif(! isset($this->sortField)){
690
+        elseif (!isset($this->sortField)) {
691 691
             
692
-            if(method_exists($this, 'getDefaultSortField')){
692
+            if (method_exists($this, 'getDefaultSortField')) {
693 693
                 $this->setSortField($this->getDefaultSortField());
694 694
             }
695
-            else{
695
+            else {
696 696
                 $columns = $this->getVisibleColumns();
697 697
                 $sortField = key($columns);
698 698
                 $this->setSortField($sortField);
@@ -701,14 +701,14 @@  discard block
 block discarded – undo
701 701
         
702 702
         $form = $this->getAdvancedFilterForm(null, $filter);
703 703
         
704
-        if(isset($filter)){
705
-            if(isset($name)){
704
+        if (isset($filter)) {
705
+            if (isset($name)) {
706 706
                 $path = array(
707 707
                     $name,
708 708
                     'filter'
709 709
                 );
710 710
             }
711
-            else{
711
+            else {
712 712
                 $path = array(
713 713
                     'filter'
714 714
                 );
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
      */
746 746
     public function getRecordControllerProxy()
747 747
     {
748
-        if(! isset($this->recordControllerProxy)){
748
+        if (!isset($this->recordControllerProxy)) {
749 749
             $this->recordControllerProxy = $this->getRecordController()->proxy();
750 750
         }
751 751
         return $this->recordControllerProxy;
@@ -760,11 +760,11 @@  discard block
 block discarded – undo
760 760
  */
761 761
 function app_TableModelViewColumn($field, $description = null)
762 762
 {
763
-    if(null === $field){
763
+    if (null === $field) {
764 764
         return null;
765 765
     }
766 766
     
767
-    if(! isset($description) && $field instanceof ORMField){
767
+    if (!isset($description) && $field instanceof ORMField) {
768 768
         $App = $field->getParentSet()->App();
769 769
         $description = $App->translate($field->getDescription());
770 770
     }
Please login to merge, or discard this patch.
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -140,16 +140,14 @@  discard block
 block discarded – undo
140 140
                 $isSearchable = false;
141 141
                 $isSortable = false;
142 142
                 $columnItem = $W->FlexItems($this->toggleCheckAllBox);
143
-            }
144
-            elseif(isset($this->sortParameterName) && self::getRecordSetField($set, $columnPath) && $isSortable){
143
+            } elseif(isset($this->sortParameterName) && self::getRecordSetField($set, $columnPath) && $isSortable){
145 144
                 if(! isset($this->sortBaseUrl)){
146 145
                     $this->sortBaseUrl = \bab_url::request_gp();
147 146
                 }
148 147
                 
149 148
                 if($this->sortField === $columnPath && $this->sortAscending){
150 149
                     $direction = ':down';
151
-                }
152
-                else{
150
+                } else{
153 151
                     $direction = ':up';
154 152
                 }
155 153
                 
@@ -166,8 +164,7 @@  discard block
 block discarded – undo
166 164
                     $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath . $direction), '');
167 165
                 }
168 166
                 $columnItem = $W->FlexItems($columnItem);
169
-            }
170
-            else{
167
+            } else{
171 168
                 $columnItem = $W->FlexItems($W->Label($columnLabel), $W->Label(''));
172 169
             }
173 170
             
@@ -299,20 +296,17 @@  discard block
 block discarded – undo
299 296
         
300 297
         if(isset($name)){
301 298
             $this->sortParameterName = $name . '[filter][sort]';
302
-        }
303
-        else{
299
+        } else{
304 300
             $this->sortParameterName = 'filter[sort]';
305 301
         }
306 302
         
307 303
         if(isset($filter['sort'])){
308 304
             $this->setSortField($filter['sort']);
309
-        }
310
-        elseif(! isset($this->sortField)){
305
+        } elseif(! isset($this->sortField)){
311 306
             
312 307
             if(method_exists($this, 'getDefaultSortField')){
313 308
                 $this->setSortField($this->getDefaultSortField());
314
-            }
315
-            else{
309
+            } else{
316 310
                 $columns = $this->getVisibleColumns();
317 311
                 $sortField = key($columns);
318 312
                 $this->setSortField($sortField);
@@ -327,8 +321,7 @@  discard block
 block discarded – undo
327 321
                     $name,
328 322
                     'filter'
329 323
                 );
330
-            }
331
-            else{
324
+            } else{
332 325
                 $path = array(
333 326
                     'filter'
334 327
                 );
@@ -392,8 +385,7 @@  discard block
 block discarded – undo
392 385
             $pos = strrpos($setName, '\\');
393 386
             if($pos === false){
394 387
                 list (, $appSetName) = explode('_', $setName);
395
-            }
396
-            else{
388
+            } else{
397 389
                 list (, $appSetName) = array(
398 390
                     substr($setName, 0, $pos),
399 391
                     substr($setName, $pos + 1)
@@ -545,8 +537,7 @@  discard block
 block discarded – undo
545 537
                         ->addClass('icon', \Func_Icons::STATUS_DIALOG_ERROR)
546 538
                         ->addAttribute('data-removefor', $column->getFieldPath()))
547 539
                         ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_ITEMS_FLEX_END));
548
-                }
549
-                elseif($displayAdvancedForm){
540
+                } elseif($displayAdvancedForm){
550 541
                     $formItem->setSizePolicy('col-lg-2 col-md-3 col-sm-6 col-xs-12');
551 542
                     $filterBox->addItem($formItem);
552 543
                 }
@@ -679,20 +670,17 @@  discard block
 block discarded – undo
679 670
         
680 671
         if(isset($name)){
681 672
             $this->sortParameterName = $name . '[filter][sort]';
682
-        }
683
-        else{
673
+        } else{
684 674
             $this->sortParameterName = 'filter[sort]';
685 675
         }
686 676
         
687 677
         if(isset($filter['sort'])){
688 678
             $this->setSortField($filter['sort']);
689
-        }
690
-        elseif(! isset($this->sortField)){
679
+        } elseif(! isset($this->sortField)){
691 680
             
692 681
             if(method_exists($this, 'getDefaultSortField')){
693 682
                 $this->setSortField($this->getDefaultSortField());
694
-            }
695
-            else{
683
+            } else{
696 684
                 $columns = $this->getVisibleColumns();
697 685
                 $sortField = key($columns);
698 686
                 $this->setSortField($sortField);
@@ -707,8 +695,7 @@  discard block
 block discarded – undo
707 695
                     $name,
708 696
                     'filter'
709 697
                 );
710
-            }
711
-            else{
698
+            } else{
712 699
                 $path = array(
713 700
                     'filter'
714 701
                 );
Please login to merge, or discard this patch.
programs/Set/AppRecord.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $value = $this->oParentSet->getBackend()->getRecordValue($this, $sFieldName);
60 60
         $field = $this->oParentSet->$sFieldName;
61
-        if(! is_null($value) && $field instanceof ORMFkField){
61
+        if (!is_null($value) && $field instanceof ORMFkField) {
62 62
             
63 63
             $sClassName = $field->getForeignSetName();
64 64
             
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function App()
95 95
     {
96
-        if(! isset($this->app)){
96
+        if (!isset($this->app)) {
97 97
             // If the app object was not specified (through the setApp() method),
98 98
             // we set it as parent set's App.
99 99
             $this->setApp($this->getParentSet()
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $App = $this->App();
115 115
         $rClass = new \ReflectionClass(get_class($this));
116 116
         $component = $App->getComponentByName($rClass->getShortName());
117
-        if(isset($component)){
117
+        if (isset($component)) {
118 118
             return $component->getRecordClassName();
119 119
             // list(, $classname) = explode('_', $component->getRecordClassName());
120 120
             // return $classname;
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function getRef()
132 132
     {
133
-        if(! isset($this->id)){
133
+        if (!isset($this->id)) {
134 134
             throw new AppException('Trying to get the reference string of a record without an id.');
135 135
         }
136 136
         $classname = $this->getClassName();
137
-        return $classname . ':' . $this->id;
137
+        return $classname.':'.$this->id;
138 138
     }
139 139
     
140 140
     /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     {
162 162
         $App = $this->App();
163 163
         
164
-        if(! isset($deletedStatus)){
164
+        if (!isset($deletedStatus)) {
165 165
             $deletedStatus = AppTraceableRecord::DELETED_STATUS_DELETED;
166 166
         }
167 167
         
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         // referenced elements.
174 174
         $manyRelations = $set->getHasManyRelations();
175 175
         
176
-        foreach ($manyRelations as $manyRelation){
176
+        foreach ($manyRelations as $manyRelation) {
177 177
             /* @var $manyRelation ORMManyRelation */
178 178
             
179 179
             $foreignSetClassName = $manyRelation->getForeignSetClassName();
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                     
188 188
                     $foreignRecords = $foreignSet->select($foreignSet->$foreignSetFieldName->is($recordId));
189 189
                     
190
-                    foreach ($foreignRecords as $foreignRecord){
190
+                    foreach ($foreignRecords as $foreignRecord) {
191 191
                         $foreignRecord->$foreignSetFieldName = 0;
192 192
                         $foreignRecord->save();
193 193
                     }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                     
199 199
                     $foreignRecords = $foreignSet->select($foreignSet->$foreignSetFieldName->is($recordId));
200 200
                     
201
-                    foreach ($foreignRecords as $foreignRecord){
201
+                    foreach ($foreignRecords as $foreignRecord) {
202 202
                         $foreignRecord->delete();
203 203
                     }
204 204
                     
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         // referenced elements.
245 245
         $manyRelations = $set->getHasManyRelations();
246 246
         
247
-        foreach ($manyRelations as $manyRelation){
247
+        foreach ($manyRelations as $manyRelation) {
248 248
             /* @var $manyRelation ORMManyRelation */
249 249
             
250 250
             $foreignSetClassName = $manyRelation->getForeignSetClassName();
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             // $foreignSet = new $foreignSetClassName($App);
255 255
             $foreignRecords = $foreignSet->select($foreignSet->$foreignSetFieldName->is($recordId));
256 256
             
257
-            foreach ($foreignRecords as $foreignRecord){
257
+            foreach ($foreignRecords as $foreignRecord) {
258 258
                 $foreignRecord->$foreignSetFieldName = $id;
259 259
                 $foreignRecord->save();
260 260
             }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $links = $linkSet->select($linkSet->sourceClass->is($recordClassName)
268 268
             ->_AND_($linkSet->sourceId->is($recordId)));
269 269
         
270
-        foreach ($links as $link){
270
+        foreach ($links as $link) {
271 271
             $link->sourceId = $id;
272 272
             $link->save();
273 273
         }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         $links = $linkSet->select($linkSet->targetClass->is($recordClassName)
276 276
             ->_AND_($linkSet->targetId->is($recordId)));
277 277
         
278
-        foreach ($links as $link){
278
+        foreach ($links as $link) {
279 279
             $link->targetId = $id;
280 280
             $link->save();
281 281
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         
301 301
         $relatedRecords = array();
302 302
         
303
-        foreach ($manyRelations as $manyRelation){
303
+        foreach ($manyRelations as $manyRelation) {
304 304
             /* @var $manyRelation ORMManyRelation */
305 305
             
306 306
             $foreignSetClassName = $manyRelation->getForeignSetClassName();
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             // $foreignSet = new $foreignSetClassName($App);
312 312
             $foreignRecords = $foreignSet->select($foreignSet->$foreignSetFieldName->is($recordId));
313 313
             
314
-            if($foreignRecords->count() > 0){
314
+            if ($foreignRecords->count() > 0) {
315 315
                 $relatedRecords[$foreignSetClassName] = $foreignRecords;
316 316
             }
317 317
         }
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     {
329 329
         $path = $this->App()->uploadPath();
330 330
         
331
-        if(null === $path){
331
+        if (null === $path) {
332 332
             throw new \Exception('Missing upload path information');
333 333
             return null;
334 334
         }
@@ -348,12 +348,12 @@  discard block
 block discarded – undo
348 348
         $linkSet = $App->LinkSet();
349 349
         
350 350
         $sourceClass = $source->getClassName();
351
-        if(strpos($sourceClass, '\\')){
351
+        if (strpos($sourceClass, '\\')) {
352 352
             $targetClass = (new \ReflectionClass($sourceClass))->getShortName();
353 353
         }
354 354
         
355 355
         $targetClass = $this->getClassName();
356
-        if(strpos($targetClass, '\\')){
356
+        if (strpos($targetClass, '\\')) {
357 357
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
358 358
         }
359 359
         
@@ -361,11 +361,11 @@  discard block
 block discarded – undo
361 361
             ->_AND_($linkSet->sourceId->is($source->id))
362 362
             ->_AND_($linkSet->targetClass->is($targetClass))
363 363
             ->_AND_($linkSet->targetId->is($this->id));
364
-        if(isset($linkType)){
365
-            if(is_array($linkType)){
364
+        if (isset($linkType)) {
365
+            if (is_array($linkType)) {
366 366
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
367 367
             }
368
-            else{
368
+            else {
369 369
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
370 370
             }
371 371
         }
@@ -388,22 +388,22 @@  discard block
 block discarded – undo
388 388
         $linkSet = $App->LinkSet();
389 389
         
390 390
         $sourceClass = $this->getClassName();
391
-        if(strpos($sourceClass, '\\')){
391
+        if (strpos($sourceClass, '\\')) {
392 392
             $targetClass = (new \ReflectionClass($sourceClass))->getShortName();
393 393
         }
394 394
         
395 395
         $targetClass = $target->getClassName();
396
-        if(strpos($targetClass, '\\')){
396
+        if (strpos($targetClass, '\\')) {
397 397
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
398 398
         }
399 399
         
400 400
         $criteria = $linkSet->all($linkSet->targetClass->is($targetClass), $linkSet->targetId->is($target->id), $linkSet->sourceClass->is($sourceClass), $linkSet->sourceId->is($this->id));
401 401
         
402
-        if(isset($linkType)){
403
-            if(is_array($linkType)){
402
+        if (isset($linkType)) {
403
+            if (is_array($linkType)) {
404 404
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
405 405
             }
406
-            else{
406
+            else {
407 407
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
408 408
             }
409 409
         }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     protected function importProperty($name, $value)
467 467
     {
468
-        if(((string) $this->$name) !== ((string) $value)){
468
+        if (((string) $this->$name) !== ((string) $value)) {
469 469
             $this->$name = $value;
470 470
             return 1;
471 471
         }
@@ -485,13 +485,13 @@  discard block
 block discarded – undo
485 485
      */
486 486
     protected function importDate($name, $value)
487 487
     {
488
-        if(preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $value)){
488
+        if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $value)) {
489 489
             return $this->importProperty($name, $value);
490 490
         }
491 491
         
492 492
         // try in DD/MM/YYYY format
493 493
         
494
-        if(preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/', $value, $matches)){
494
+        if (preg_match('/(?P<day>[0-9]+)\/(?P<month>[0-9]+)\/(?P<year>[0-9]{2,4})/', $value, $matches)) {
495 495
             
496 496
             $value = sprintf('%04d-%02d-%02d', (int) $matches['year'], (int) $matches['month'], (int) $matches['day']);
497 497
             
@@ -511,11 +511,11 @@  discard block
 block discarded – undo
511 511
         $customContainers->groupBy($customContainerSet->view);
512 512
         
513 513
         $views = array();
514
-        foreach ($customContainers as $customContainer){
514
+        foreach ($customContainers as $customContainer) {
515 515
             $views[] = $customContainer->view;
516 516
         }
517 517
         
518
-        if(empty($views)){
518
+        if (empty($views)) {
519 519
             $views[] = '';
520 520
         }
521 521
         
@@ -599,9 +599,9 @@  discard block
 block discarded – undo
599 599
      */
600 600
     public function requireReadable($message = null)
601 601
     {
602
-        if(! $this->isReadable()){
602
+        if (!$this->isReadable()) {
603 603
             $App = $this->App();
604
-            if(! isset($message)){
604
+            if (!isset($message)) {
605 605
                 $message = $App->translate('Access denied');
606 606
             }
607 607
             throw new AppAccessException($message);
@@ -617,9 +617,9 @@  discard block
 block discarded – undo
617 617
      */
618 618
     public function requireUpdatable($message = null)
619 619
     {
620
-        if(! $this->isUpdatable()){
620
+        if (!$this->isUpdatable()) {
621 621
             $App = $this->App();
622
-            if(! isset($message)){
622
+            if (!isset($message)) {
623 623
                 $message = $App->translate('Access denied');
624 624
             }
625 625
             throw new AppAccessException($message);
@@ -635,9 +635,9 @@  discard block
 block discarded – undo
635 635
      */
636 636
     public function requireDeletable($message = null)
637 637
     {
638
-        if(! $this->isDeletable()){
638
+        if (!$this->isDeletable()) {
639 639
             $App = $this->App();
640
-            if(! isset($message)){
640
+            if (!isset($message)) {
641 641
                 $message = $App->translate('Access denied');
642 642
             }
643 643
             throw new AppAccessException($message);
Please login to merge, or discard this patch.
programs/Set/AppRecordSet.php 2 patches
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
      */
103 103
     protected function trimSetName($setName)
104 104
     {
105
-        if(strpos($setName, '_') === false){
105
+        if (strpos($setName, '_') === false) {
106 106
             return $setName;
107 107
         }
108 108
         $pos = strrpos($setName, '\\');
109
-        if($pos === false){
109
+        if ($pos === false) {
110 110
             return explode('_', $setName)[1];
111 111
         }
112 112
         return substr($setName, $pos + 1);
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
     public function join($fkFieldName)
122 122
     {
123 123
         $fkField = $this->getField($fkFieldName);
124
-        if(! ($fkField instanceof ORMFkField)){
124
+        if (!($fkField instanceof ORMFkField)) {
125 125
             return $this;
126 126
         }
127 127
         $setName = $fkField->getForeignSetName();
128 128
         
129
-        if(! $setName || 'Set' === $setName){
130
-            throw new \Exception('The set name is missing on foreign key field ' . $fkFieldName);
129
+        if (!$setName || 'Set' === $setName) {
130
+            throw new \Exception('The set name is missing on foreign key field '.$fkFieldName);
131 131
         }
132 132
         
133 133
         $appSetName = $this->trimSetName($setName);
@@ -165,22 +165,22 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $App = $this->App();
167 167
         
168
-        if(null === $this->customFields){
168
+        if (null === $this->customFields) {
169 169
             $this->customFields = array();
170 170
             
171
-            if(isset($App->CustomField)){
171
+            if (isset($App->CustomField)) {
172 172
                 $customFieldSet = $App->CustomFieldSet();
173 173
                 $object = mb_substr(get_class($this), mb_strlen($App->classPrefix), - mb_strlen('Set'));
174
-                try{
174
+                try {
175 175
                     $customFields = $customFieldSet->select($customFieldSet->object->is($object));
176 176
                     
177
-                    foreach ($customFields as $customfield){
177
+                    foreach ($customFields as $customfield) {
178 178
                         $this->customFields[] = $customfield;
179 179
                         
180 180
                         /*@var $customfield AppCustomField */
181 181
                     }
182 182
                 }
183
-                catch (ORMBackEndSelectException $e){
183
+                catch (ORMBackEndSelectException $e) {
184 184
                     // table does not exist, this error is thrown by the install program while creating the sets
185 185
                 }
186 186
             }
@@ -210,15 +210,15 @@  discard block
 block discarded – undo
210 210
     public function addCustomFields()
211 211
     {
212 212
         $customFields = $this->selectCustomFields();
213
-        foreach ($customFields as $customField){
213
+        foreach ($customFields as $customField) {
214 214
             /*@var $customField AppCustomField */
215 215
             $description = $customField->name;
216 216
             $ormField = $customField->getORMField()->setDescription($description);
217
-            if($ormField instanceof ORMFkField){
217
+            if ($ormField instanceof ORMFkField) {
218 218
                 $this->hasOne($customField->fieldname, $ormField->getForeignSetName())
219 219
                     ->setDescription($description);
220 220
             }
221
-            else{
221
+            else {
222 222
                 $this->addFields($ormField);
223 223
             }
224 224
         }
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
     public function request($mixedParam = null, $sPropertyName = null)
248 248
     {
249 249
         $record = $this->get($mixedParam, $sPropertyName);
250
-        if(! isset($record)){
250
+        if (!isset($record)) {
251 251
             // This will remove the default criteria for TraceableRecords and
252 252
             // fetch even 'deleted' ones.
253 253
             $this->setDefaultCriteria(null);
254 254
             $record = $this->get($mixedParam, $sPropertyName);
255
-            if(isset($record)){
255
+            if (isset($record)) {
256 256
                 throw new AppDeletedRecordException($record, $mixedParam);
257 257
             }
258 258
             throw new AppNotFoundException($this, $mixedParam);
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
         $linkSet = $this->App()->LinkSet();
276 276
         
277 277
         $targetClass = $this->getRecordClassName();
278
-        if(strpos($targetClass, '\\')){
278
+        if (strpos($targetClass, '\\')) {
279 279
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
280 280
         }
281 281
         
282
-        if(is_array($source) || ($source instanceof \Iterator)){
282
+        if (is_array($source) || ($source instanceof \Iterator)) {
283 283
             return $linkSet->selectForSources($source, $targetClass, $linkType);
284 284
         }
285
-        else{
285
+        else {
286 286
             return $linkSet->selectForSource($source, $targetClass, $linkType);
287 287
         }
288 288
     }
@@ -302,14 +302,14 @@  discard block
 block discarded – undo
302 302
         $linkSet = $this->App()->LinkSet();
303 303
         
304 304
         $sourceClass = $this->getRecordClassName();
305
-        if(strpos($sourceClass, '\\')){
305
+        if (strpos($sourceClass, '\\')) {
306 306
             $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
307 307
         }
308 308
         
309
-        if(is_array($target) || ($target instanceof \Iterator)){
309
+        if (is_array($target) || ($target instanceof \Iterator)) {
310 310
             return $linkSet->selectForTargets($target, $sourceClass, $linkType);
311 311
         }
312
-        else{
312
+        else {
313 313
             return $linkSet->selectForTarget($target, $sourceClass, $linkType);
314 314
         }
315 315
     }
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
         $linkSet = $App->LinkSet();
328 328
         
329 329
         $recordClassName = $this->getRecordClassName();
330
-        if(strpos($recordClassName, '\\')){
330
+        if (strpos($recordClassName, '\\')) {
331 331
             $recordClassName = (new \ReflectionClass($recordClassName))->getShortName();
332 332
         }
333 333
         $linkSet->hasOne('sourceId', $recordClassName);
334 334
         
335 335
         $targetClass = $target->getClassName();
336
-        if(strpos($targetClass, '\\')){
336
+        if (strpos($targetClass, '\\')) {
337 337
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
338 338
         }
339 339
         
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
             ->_AND_($linkSet->targetId->is($target->id))
342 342
             ->_AND_($linkSet->sourceClass->is($this->newRecord()
343 343
             ->getClassName()));
344
-        if(isset($linkType)){
345
-            if(is_array($linkType)){
344
+        if (isset($linkType)) {
345
+            if (is_array($linkType)) {
346 346
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
347 347
             }
348
-            else{
348
+            else {
349 349
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
350 350
             }
351 351
         }
@@ -367,29 +367,29 @@  discard block
 block discarded – undo
367 367
         $linkSet = $App->LinkSet();
368 368
         
369 369
         $recordClassName = $this->getRecordClassName();
370
-        if(strpos($recordClassName, '\\')){
370
+        if (strpos($recordClassName, '\\')) {
371 371
             $recordClassName = (new \ReflectionClass($recordClassName))->getShortName();
372 372
         }
373 373
         $linkSet->hasOne('targetId', $recordClassName);
374 374
         
375 375
         $sourceClass = $source->getClassName();
376
-        if(strpos($sourceClass, '\\')){
376
+        if (strpos($sourceClass, '\\')) {
377 377
             $sourceClass = new \ReflectionClass($sourceClass);
378 378
         }
379 379
         
380 380
         $targetClass = $this->newRecord()->getClassName();
381
-        if(strpos($targetClass, '\\')){
381
+        if (strpos($targetClass, '\\')) {
382 382
             $targetClass = new \ReflectionClass($targetClass);
383 383
         }
384 384
         
385 385
         $criteria = $linkSet->sourceClass->is($sourceClass)
386 386
             ->_AND_($linkSet->sourceId->is($source->id))
387 387
             ->_AND_($linkSet->targetClass->is($targetClass));
388
-        if(isset($linkType)){
389
-            if(is_array($linkType)){
388
+        if (isset($linkType)) {
389
+            if (is_array($linkType)) {
390 390
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
391 391
             }
392
-            else{
392
+            else {
393 393
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
394 394
             }
395 395
         }
@@ -411,39 +411,39 @@  discard block
 block discarded – undo
411 411
         $App = $this->App();
412 412
         $linkSet = $App->LinkSet();
413 413
         $recordClassName = $linkSet->getRecordClassName();
414
-        if(strpos($recordClassName, '\\')){
414
+        if (strpos($recordClassName, '\\')) {
415 415
             $recordClassName = (new \ReflectionClass($recordClassName))->getShortName();
416 416
         }
417 417
         $linkSet->hasOne('targetId', $recordClassName);
418 418
         
419 419
         $sourceIdsByClasses = array();
420
-        foreach ($sources as $source){
420
+        foreach ($sources as $source) {
421 421
             $sourceClass = $source->getClassName();
422
-            if(strpos($sourceClass, '\\')){
422
+            if (strpos($sourceClass, '\\')) {
423 423
                 $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
424 424
             }
425
-            if(! isset($sourceIdsByClasses[$sourceClass])){
425
+            if (!isset($sourceIdsByClasses[$sourceClass])) {
426 426
                 $sourceIdsByClasses[$sourceClass] = array();
427 427
             }
428 428
             $sourceIdsByClasses[$sourceClass][] = $source->id;
429 429
         }
430 430
         
431 431
         $sourcesCriteria = array();
432
-        foreach ($sourceIdsByClasses as $sourceClass => $sourceIds){
432
+        foreach ($sourceIdsByClasses as $sourceClass => $sourceIds) {
433 433
             $sourcesCriteria[] = $linkSet->sourceClass->is($sourceClass)->_AND_($linkSet->sourceId->in($sourceIds));
434 434
         }
435 435
         
436 436
         $targetClass = $this->newRecord()->getClassName();
437
-        if(strpos($targetClass, '\\')){
437
+        if (strpos($targetClass, '\\')) {
438 438
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
439 439
         }
440 440
         
441 441
         $criteria = $linkSet->all($linkSet->targetClass->is($targetClass), $linkSet->any($sourcesCriteria));
442
-        if(isset($linkType)){
443
-            if(is_array($linkType)){
442
+        if (isset($linkType)) {
443
+            if (is_array($linkType)) {
444 444
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
445 445
             }
446
-            else{
446
+            else {
447 447
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
448 448
             }
449 449
         }
@@ -465,39 +465,39 @@  discard block
 block discarded – undo
465 465
         $App = $this->App();
466 466
         $linkSet = $App->LinkSet();
467 467
         $recordClassName = $this->getRecordClassName();
468
-        if(strpos($recordClassName, '\\')){
468
+        if (strpos($recordClassName, '\\')) {
469 469
             $recordClassName = (new \ReflectionClass($recordClassName))->getShortName();
470 470
         }
471 471
         $linkSet->hasOne('sourceId', $recordClassName);
472 472
         
473 473
         $targetIdsByClasses = array();
474
-        foreach ($targets as $target){
474
+        foreach ($targets as $target) {
475 475
             $targetClass = $target->getClassName();
476
-            if(strpos($targetClass, '\\')){
476
+            if (strpos($targetClass, '\\')) {
477 477
                 $targetClass = (new \ReflectionClass($targetClass))->getShortName();
478 478
             }
479
-            if(! isset($targetIdsByClasses[$targetClass])){
479
+            if (!isset($targetIdsByClasses[$targetClass])) {
480 480
                 $targetIdsByClasses[$targetClass] = array();
481 481
             }
482 482
             $targetIdsByClasses[$targetClass][] = $target->id;
483 483
         }
484 484
         
485 485
         $targetsCriteria = array();
486
-        foreach ($targetIdsByClasses as $targetClass => $targetIds){
486
+        foreach ($targetIdsByClasses as $targetClass => $targetIds) {
487 487
             $targetsCriteria[] = $linkSet->targetClass->is($targetClass)->_AND_($linkSet->targetId->in($targetIds));
488 488
         }
489 489
         
490 490
         $sourceClass = $this->newRecord()->getClassName();
491
-        if(strpos($sourceClass, '\\')){
491
+        if (strpos($sourceClass, '\\')) {
492 492
             $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
493 493
         }
494 494
         
495 495
         $criteria = $linkSet->all($linkSet->sourceClass->is($sourceClass), $linkSet->any($targetsCriteria));
496
-        if(isset($linkType)){
497
-            if(is_array($linkType)){
496
+        if (isset($linkType)) {
497
+            if (is_array($linkType)) {
498 498
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
499 499
             }
500
-            else{
500
+            else {
501 501
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
502 502
             }
503 503
         }
@@ -612,19 +612,19 @@  discard block
 block discarded – undo
612 612
         $criteria = $linkSet->sourceClass->is((new \ReflectionClass($this->getRecordClassName()))->getShortName())
613 613
             ->_AND_($linkSet->targetClass->is($tagClassName));
614 614
         
615
-        if(is_array($tagLabels)){
615
+        if (is_array($tagLabels)) {
616 616
             $criteria = $criteria->_AND_($linkSet->targetId->label->in($tagLabels));
617 617
         }
618
-        else{
618
+        else {
619 619
             $criteria = $criteria->_AND_($linkSet->targetId->label->is($tagLabels));
620 620
         }
621
-        if(isset($linkType)){
621
+        if (isset($linkType)) {
622 622
             $criteria = $criteria->_AND_($linkSet->type->is($linkType));
623 623
         }
624 624
         $links = $linkSet->select($criteria);
625 625
         
626 626
         $ids = array();
627
-        foreach ($links as $link){
627
+        foreach ($links as $link) {
628 628
             $ids[$link->sourceId] = $link->sourceId;
629 629
         }
630 630
         
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
     {
636 636
         $fields = $this->getFields();
637 637
         $manyRelations = $this->getHasManyRelations();
638
-        foreach ($manyRelations as $fieldName => $manyRelation){
638
+        foreach ($manyRelations as $fieldName => $manyRelation) {
639 639
             $fields[$fieldName] = $manyRelation;
640 640
         }
641 641
         return $fields;
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -179,8 +179,7 @@  discard block
 block discarded – undo
179 179
                         
180 180
                         /*@var $customfield AppCustomField */
181 181
                     }
182
-                }
183
-                catch (ORMBackEndSelectException $e){
182
+                } catch (ORMBackEndSelectException $e){
184 183
                     // table does not exist, this error is thrown by the install program while creating the sets
185 184
                 }
186 185
             }
@@ -217,8 +216,7 @@  discard block
 block discarded – undo
217 216
             if($ormField instanceof ORMFkField){
218 217
                 $this->hasOne($customField->fieldname, $ormField->getForeignSetName())
219 218
                     ->setDescription($description);
220
-            }
221
-            else{
219
+            } else{
222 220
                 $this->addFields($ormField);
223 221
             }
224 222
         }
@@ -281,8 +279,7 @@  discard block
 block discarded – undo
281 279
         
282 280
         if(is_array($source) || ($source instanceof \Iterator)){
283 281
             return $linkSet->selectForSources($source, $targetClass, $linkType);
284
-        }
285
-        else{
282
+        } else{
286 283
             return $linkSet->selectForSource($source, $targetClass, $linkType);
287 284
         }
288 285
     }
@@ -308,8 +305,7 @@  discard block
 block discarded – undo
308 305
         
309 306
         if(is_array($target) || ($target instanceof \Iterator)){
310 307
             return $linkSet->selectForTargets($target, $sourceClass, $linkType);
311
-        }
312
-        else{
308
+        } else{
313 309
             return $linkSet->selectForTarget($target, $sourceClass, $linkType);
314 310
         }
315 311
     }
@@ -344,8 +340,7 @@  discard block
 block discarded – undo
344 340
         if(isset($linkType)){
345 341
             if(is_array($linkType)){
346 342
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
347
-            }
348
-            else{
343
+            } else{
349 344
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
350 345
             }
351 346
         }
@@ -388,8 +383,7 @@  discard block
 block discarded – undo
388 383
         if(isset($linkType)){
389 384
             if(is_array($linkType)){
390 385
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
391
-            }
392
-            else{
386
+            } else{
393 387
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
394 388
             }
395 389
         }
@@ -442,8 +436,7 @@  discard block
 block discarded – undo
442 436
         if(isset($linkType)){
443 437
             if(is_array($linkType)){
444 438
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
445
-            }
446
-            else{
439
+            } else{
447 440
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
448 441
             }
449 442
         }
@@ -496,8 +489,7 @@  discard block
 block discarded – undo
496 489
         if(isset($linkType)){
497 490
             if(is_array($linkType)){
498 491
                 $criteria = $criteria->_AND_($linkSet->type->in($linkType));
499
-            }
500
-            else{
492
+            } else{
501 493
                 $criteria = $criteria->_AND_($linkSet->type->is($linkType));
502 494
             }
503 495
         }
@@ -614,8 +606,7 @@  discard block
 block discarded – undo
614 606
         
615 607
         if(is_array($tagLabels)){
616 608
             $criteria = $criteria->_AND_($linkSet->targetId->label->in($tagLabels));
617
-        }
618
-        else{
609
+        } else{
619 610
             $criteria = $criteria->_AND_($linkSet->targetId->label->is($tagLabels));
620 611
         }
621 612
         if(isset($linkType)){
Please login to merge, or discard this patch.
programs/Set/AppLinkSet.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $link = $this->newRecord();
93 93
         $sourceClass = $source->getClassName();
94
-        if(strpos($sourceClass, '\\')){
94
+        if (strpos($sourceClass, '\\')) {
95 95
             $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
96 96
         }
97 97
         $targetClass = $target->getClassName();
98
-        if(strpos($targetClass, '\\')){
98
+        if (strpos($targetClass, '\\')) {
99 99
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
100 100
         }
101 101
         $link->sourceClass = $sourceClass;
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function joinSource($sourceClass)
116 116
     {
117
-        if(strpos($sourceClass, '\\')){
117
+        if (strpos($sourceClass, '\\')) {
118 118
             $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
119 119
         }
120
-        if(! $this->sourceId instanceof $sourceClass){
121
-            $this->hasOne('sourceId', $sourceClass . 'Set');
120
+        if (!$this->sourceId instanceof $sourceClass) {
121
+            $this->hasOne('sourceId', $sourceClass.'Set');
122 122
             $this->join('sourceId');
123 123
         }
124 124
     }
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function joinTarget($targetClass = null)
130 130
     {
131
-        if(strpos($targetClass, '\\')){
131
+        if (strpos($targetClass, '\\')) {
132 132
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
133 133
         }
134
-        if(! $this->targetId instanceof $targetClass){
135
-            $this->hasOne('targetId', $targetClass . 'Set');
134
+        if (!$this->targetId instanceof $targetClass) {
135
+            $this->hasOne('targetId', $targetClass.'Set');
136 136
             $this->join('targetId');
137 137
         }
138 138
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function sourceIsA($recordClass)
145 145
     {
146
-        if(strpos($recordClass, '\\')){
146
+        if (strpos($recordClass, '\\')) {
147 147
             $recordClass = (new \ReflectionClass($recordClass))->getShortName();
148 148
         }
149 149
         return $this->sourceClass->is($recordClass);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function targetIsA($recordClass)
166 166
     {
167
-        if(strpos($recordClass, '\\')){
167
+        if (strpos($recordClass, '\\')) {
168 168
             $recordClass = (new \ReflectionClass($recordClass))->getShortName();
169 169
         }
170 170
         return $this->targetClass->is($recordClass);
@@ -187,24 +187,24 @@  discard block
 block discarded – undo
187 187
         $criteria = $this->sourceIs($object);
188 188
         
189 189
         
190
-        if(isset($targetClass)){
191
-            if(strpos($targetClass, '\\')){
190
+        if (isset($targetClass)) {
191
+            if (strpos($targetClass, '\\')) {
192 192
                 $targetClass = (new \ReflectionClass($targetClass))->getShortName();
193 193
             }
194 194
             $this->joinTarget($targetClass);
195 195
             $criteria = $criteria->_AND_($this->targetClass->is($targetClass));
196 196
         }
197 197
         
198
-        if(isset($linkType)){
199
-            if(is_array($linkType)){
198
+        if (isset($linkType)) {
199
+            if (is_array($linkType)) {
200 200
                 $criteria = $criteria->_AND_($this->type->in($linkType));
201 201
             }
202
-            else{
202
+            else {
203 203
                 $criteria = $criteria->_AND_($this->type->is($linkType));
204 204
             }
205 205
         }
206 206
         
207
-        if(is_a($this->targetId, 'app_TraceableRecordSet')){
207
+        if (is_a($this->targetId, 'app_TraceableRecordSet')) {
208 208
             $criteria = $criteria->_AND_($this->targetId->deleted->is(false));
209 209
         }
210 210
         
@@ -219,27 +219,27 @@  discard block
 block discarded – undo
219 219
         $sourceClass = null;
220 220
         $sourceIds = array();
221 221
         
222
-        foreach ($objects as $obj){
223
-            if(is_null($sourceClass)){
222
+        foreach ($objects as $obj) {
223
+            if (is_null($sourceClass)) {
224 224
                 $sourceClass = $obj->getClassName();
225 225
             }
226 226
             $sourceIds[] = $obj->id;
227 227
         }
228 228
         $criteria = $this->sourceId->in($sourceIds)->_AND_($this->sourceClass->is($sourceClass));
229 229
         
230
-        if(isset($targetClass)){
231
-            if(strpos($targetClass, '\\')){
230
+        if (isset($targetClass)) {
231
+            if (strpos($targetClass, '\\')) {
232 232
                 $targetClass = (new \ReflectionClass($targetClass))->getShortName();
233 233
             }
234 234
             $this->joinTarget($targetClass);
235 235
             $criteria = $criteria->_AND_($this->targetClass->is($targetClass));
236 236
         }
237 237
         
238
-        if(isset($linkType)){
239
-            if(is_array($linkType)){
238
+        if (isset($linkType)) {
239
+            if (is_array($linkType)) {
240 240
                 $criteria = $criteria->_AND_($this->type->in($linkType));
241 241
             }
242
-            else{
242
+            else {
243 243
                 $criteria = $criteria->_AND_($this->type->is($linkType));
244 244
             }
245 245
         }
@@ -253,19 +253,19 @@  discard block
 block discarded – undo
253 253
     {
254 254
         $criteria = $this->targetIs($object);
255 255
         
256
-        if(isset($sourceClass)){
257
-            if(strpos($sourceClass, '\\')){
256
+        if (isset($sourceClass)) {
257
+            if (strpos($sourceClass, '\\')) {
258 258
                 $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
259 259
             }
260 260
             $this->joinSource($sourceClass);
261 261
             $criteria = $criteria->_AND_($this->sourceClass->is($sourceClass));
262 262
         }
263 263
         
264
-        if(isset($linkType)){
265
-            if(is_array($linkType)){
264
+        if (isset($linkType)) {
265
+            if (is_array($linkType)) {
266 266
                 $criteria = $criteria->_AND_($this->type->in($linkType));
267 267
             }
268
-            else{
268
+            else {
269 269
                 $criteria = $criteria->_AND_($this->type->is($linkType));
270 270
             }
271 271
         }
@@ -281,27 +281,27 @@  discard block
 block discarded – undo
281 281
         $targetClass = null;
282 282
         $targetIds = array();
283 283
         
284
-        foreach ($objects as $obj){
285
-            if(is_null($targetClass)){
284
+        foreach ($objects as $obj) {
285
+            if (is_null($targetClass)) {
286 286
                 $targetClass = $obj->getClassName();
287 287
             }
288 288
             $targetIds[] = $obj->id;
289 289
         }
290 290
         $criteria = $this->targetId->in($targetIds)->_AND_($this->targetClass->is($targetClass));
291 291
         
292
-        if(isset($sourceClass)){
293
-            if(strpos($sourceClass, '\\')){
292
+        if (isset($sourceClass)) {
293
+            if (strpos($sourceClass, '\\')) {
294 294
                 $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
295 295
             }
296 296
             $this->joinSource($sourceClass);
297 297
             $criteria = $criteria->_AND_($this->sourceClass->is($sourceClass));
298 298
         }
299 299
         
300
-        if(isset($linkType)){
301
-            if(is_array($linkType)){
300
+        if (isset($linkType)) {
301
+            if (is_array($linkType)) {
302 302
                 $criteria = $criteria->_AND_($this->type->in($linkType));
303 303
             }
304
-            else{
304
+            else {
305 305
                 $criteria = $criteria->_AND_($this->type->is($linkType));
306 306
             }
307 307
         }
@@ -325,20 +325,20 @@  discard block
 block discarded – undo
325 325
         
326 326
         $criteria = $set->sourceId->is($object->id)->_AND_($set->sourceClass->is($object->getClassName()));
327 327
         
328
-        if(null !== $targetClass){
329
-            if(strpos($targetClass, '\\')){
328
+        if (null !== $targetClass) {
329
+            if (strpos($targetClass, '\\')) {
330 330
                 $targetClass = (new \ReflectionClass($targetClass))->getShortName();
331 331
             }
332 332
             $criteria = $criteria->_AND_($set->targetClass->is($targetClass));
333 333
         }
334
-        if(null !== $linkType){
334
+        if (null !== $linkType) {
335 335
             $criteria = $criteria->_AND_($set->type->is($linkType));
336 336
         }
337 337
         
338
-        if($deleteTarget){
339
-            foreach ($set->select($criteria) as $link){
338
+        if ($deleteTarget) {
339
+            foreach ($set->select($criteria) as $link) {
340 340
                 
341
-                $className = $link->targetClass . 'Set';
341
+                $className = $link->targetClass.'Set';
342 342
                 
343 343
                 // remove prefix
344 344
                 
@@ -363,22 +363,22 @@  discard block
 block discarded – undo
363 363
     public function deleteLink($source, $target, $linkType = null)
364 364
     {
365 365
         $sourceClass = $source->getClassName();
366
-        if(strpos($sourceClass, '\\')){
366
+        if (strpos($sourceClass, '\\')) {
367 367
             $sourceClass = (new \ReflectionClass($sourceClass))->getShortName();
368 368
         }
369 369
         $targetClass = $target->getClassName();
370
-        if(strpos($targetClass, '\\')){
370
+        if (strpos($targetClass, '\\')) {
371 371
             $targetClass = (new \ReflectionClass($targetClass))->getShortName();
372 372
         }
373 373
         $criteria = $this->sourceId->is($source->id)
374 374
             ->_AND_($this->sourceClass->is($sourceClass))
375 375
             ->_AND_($this->targetId->is($target->id))
376 376
             ->_AND_($this->targetClass->is($targetClass));
377
-        if(isset($linkType)){
378
-            if(is_array($linkType)){
377
+        if (isset($linkType)) {
378
+            if (is_array($linkType)) {
379 379
                 $criteria = $criteria->_AND_($this->type->in($linkType));
380 380
             }
381
-            else{
381
+            else {
382 382
                 $criteria = $criteria->_AND_($this->type->is($linkType));
383 383
             }
384 384
         }
Please login to merge, or discard this patch.
programs/Ctrl/AppController.php 1 patch
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 use Capwelton\LibApp\Func_App;
40 40
 use Capwelton\LibApp\AppComponent;
41 41
 use Capwelton\LibOrm\Exceptions\ORMException;
42
-require_once $GLOBALS['babInstallPath'] . 'utilit/controller.class.php';
43
-require_once $GLOBALS['babInstallPath'] . 'utilit/json.php';
42
+require_once $GLOBALS['babInstallPath'].'utilit/controller.class.php';
43
+require_once $GLOBALS['babInstallPath'].'utilit/json.php';
44 44
 
45
-require_once dirname(__FILE__) . '/../functions.php';
45
+require_once dirname(__FILE__).'/../functions.php';
46 46
 
47 47
 /**
48 48
  * @method self proxy()
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function addReloadSelector($reloadSelector, $withSSE = false, $for = null)
77 77
     {
78 78
         $this->reloadSelectors[$reloadSelector] = $reloadSelector;
79
-        if($withSSE){
79
+        if ($withSSE) {
80 80
             $sseRecordSet = $this->getSSERecordSet();
81 81
             $sseRecordSet->newReloadSelector($reloadSelector, $for);
82 82
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     
94 94
     public function getSSERecordSet()
95 95
     {
96
-        if(isset($this->SSERecordSet)){
96
+        if (isset($this->SSERecordSet)) {
97 97
             return $this->SSERecordSet;
98 98
         }
99 99
         
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function __call($name, $arguments = array())
139 139
     {
140 140
         $component = $this->App()->getComponentByName($name);
141
-        if($component){
141
+        if ($component) {
142 142
             return call_user_func_array(array(
143 143
                 $component,
144 144
                 'controller'
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function isAjaxRequest()
183 183
     {
184
-        if(! isset($this->isAjaxRequest)){
184
+        if (!isset($this->isAjaxRequest)) {
185 185
             $this->isAjaxRequest = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
186 186
         }
187 187
         return $this->isAjaxRequest;
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function requireCredential($message = null)
195 195
     {
196
-        if($this->isAjaxRequest()){
196
+        if ($this->isAjaxRequest()) {
197 197
             $authType = 'Basic';
198 198
         }
199
-        else{
199
+        else {
200 200
             $authType = '';
201 201
         }
202 202
         
203
-        if(! isset($message)){
203
+        if (!isset($message)) {
204 204
             $message = $this->App()->translate('You must be logged in to access this page.');
205 205
         }
206 206
         
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
         list ($prefix) = explode('_', __CLASS__);
225 225
         $functionalityName = ucwords($prefix);
226 226
         /** @var Func_App */
227
-        $App = @\bab_functionality::get('App/' . $functionalityName);
227
+        $App = @\bab_functionality::get('App/'.$functionalityName);
228 228
         
229
-        if(!$App){
230
-            throw new AppException('Faild to autodetect functionality App/' . $functionalityName . ', the getInstance method is deprecated, use $App->ControllerProxy() instead');
229
+        if (!$App) {
230
+            throw new AppException('Faild to autodetect functionality App/'.$functionalityName.', the getInstance method is deprecated, use $App->ControllerProxy() instead');
231 231
         }
232 232
         
233 233
         $controller = $App->ControllerProxy($classname, $proxy);
@@ -245,44 +245,44 @@  discard block
 block discarded – undo
245 245
     static function getProxyInstance(Func_App $App, $classname)
246 246
     {
247 247
         $class = new \ReflectionClass($classname);
248
-        $proxyClassname = $class->getShortName() . self::PROXY_CLASS_SUFFIX;
248
+        $proxyClassname = $class->getShortName().self::PROXY_CLASS_SUFFIX;
249 249
         $finalProxyClassname = $class->getNamespaceName()."\\".$proxyClassname;
250
-        if(! class_exists($finalProxyClassname)){
250
+        if (!class_exists($finalProxyClassname)) {
251 251
             $classStr = "";
252
-            if($class->getNamespaceName() != ""){
252
+            if ($class->getNamespaceName() != "") {
253 253
                 $classStr .= " namespace ".$class->getNamespaceName()."; ";
254 254
             }
255
-            $classStr .= 'class ' . $proxyClassname . ' extends ' . $class->getShortName() . ' {' . "\n";
255
+            $classStr .= 'class '.$proxyClassname.' extends '.$class->getShortName().' {'."\n";
256 256
             $methods = $class->getMethods();
257 257
             
258 258
             $classStr .= '	public function __construct($App) {
259 259
                 $this->setApp($App);
260 260
             }' . "\n";
261 261
             
262
-            foreach ($methods as $method){
263
-                if($method->name === '__construct' || ! $method->isPublic() || $method->isStatic() || $method->isFinal() || $method->name === 'setApp' || $method->name === 'App' || $method->name === 'setCrm' || $method->name === 'Crm'){
262
+            foreach ($methods as $method) {
263
+                if ($method->name === '__construct' || !$method->isPublic() || $method->isStatic() || $method->isFinal() || $method->name === 'setApp' || $method->name === 'App' || $method->name === 'setCrm' || $method->name === 'Crm') {
264 264
                     continue;
265 265
                 }
266 266
                 
267
-                $classStr .= '	public function ' . $method->name . '(';
267
+                $classStr .= '	public function '.$method->name.'(';
268 268
                 $parameters = $method->getParameters();
269 269
                 $parametersStr = array();
270
-                foreach ($parameters as $parameter){
270
+                foreach ($parameters as $parameter) {
271 271
                     
272
-                    if($parameter->isDefaultValueAvailable()){
273
-                        $parametersStr[] = '$' . $parameter->name . ' = ' . var_export($parameter->getDefaultValue(), true);
272
+                    if ($parameter->isDefaultValueAvailable()) {
273
+                        $parametersStr[] = '$'.$parameter->name.' = '.var_export($parameter->getDefaultValue(), true);
274 274
                     }
275
-                    else{
276
-                        $parametersStr[] = '$' . $parameter->name;
275
+                    else {
276
+                        $parametersStr[] = '$'.$parameter->name;
277 277
                     }
278 278
                 }
279 279
                 $classStr .= implode(', ', $parametersStr);
280
-                $classStr .= ') {' . "\n";
281
-                $classStr .= '		$args = func_get_args();' . "\n";
282
-                $classStr .= '		return $this->getMethodAction(__FUNCTION__, $args);' . "\n";
283
-                $classStr .= '	}' . "\n";
280
+                $classStr .= ') {'."\n";
281
+                $classStr .= '		$args = func_get_args();'."\n";
282
+                $classStr .= '		return $this->getMethodAction(__FUNCTION__, $args);'."\n";
283
+                $classStr .= '	}'."\n";
284 284
             }
285
-            $classStr .= '}' . "\n";
285
+            $classStr .= '}'."\n";
286 286
             // We define the proxy class
287 287
             eval($classStr);
288 288
         }
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
     protected function getObjectName($classname)
321 321
     {
322 322
         list ($objectname) = explode('Controller', $classname);
323
-        if($this->App()->getComponentByName($objectname)){
323
+        if ($this->App()->getComponentByName($objectname)) {
324 324
             return strtolower($objectname);
325 325
         }
326 326
         list (, $objectname) = explode('Ctrl', $classname);
@@ -342,18 +342,18 @@  discard block
 block discarded – undo
342 342
         
343 343
         $reflector = new \ReflectionClass(get_class($this));
344 344
         $parent = $reflector->getParentClass();
345
-        if($parent){
345
+        if ($parent) {
346 346
             $parentMethod = $parent->getMethod('__construct');
347 347
             $docComment = $parentMethod->getDocComment();
348
-            if(strpos($docComment, '@isComponentController') !== false){
348
+            if (strpos($docComment, '@isComponentController') !== false) {
349 349
                 $fullClassName = $parent->getName();
350 350
             }
351 351
         }
352 352
         
353 353
         $rc = new \ReflectionClass($fullClassName);
354 354
         
355
-        if(! $rc->hasMethod($methodName)){
356
-            throw new \bab_InvalidActionException($fullClassName . '::' . $methodName);
355
+        if (!$rc->hasMethod($methodName)) {
356
+            throw new \bab_InvalidActionException($fullClassName.'::'.$methodName);
357 357
         }
358 358
         $method = new \ReflectionMethod($fullClassName, $methodName);
359 359
         
@@ -362,32 +362,32 @@  discard block
 block discarded – undo
362 362
         $parameters = $method->getParameters();
363 363
         $actionParams = array();
364 364
         $argNumber = 0;
365
-        foreach ($parameters as $parameter){
365
+        foreach ($parameters as $parameter) {
366 366
             $parameterName = $parameter->getName();
367
-            if(isset($args[$argNumber])){
367
+            if (isset($args[$argNumber])) {
368 368
                 $actionParams[$parameterName] = $args[$argNumber];
369 369
             }
370
-            elseif($parameter->isDefaultValueAvailable()){
370
+            elseif ($parameter->isDefaultValueAvailable()) {
371 371
                 $actionParams[$parameterName] = $parameter->getDefaultValue();
372 372
             }
373
-            else{
373
+            else {
374 374
                 $actionParams[$parameterName] = null;
375 375
             }
376
-            $argNumber ++;
376
+            $argNumber++;
377 377
         }
378 378
         
379 379
         $action = new WidgetAction();
380 380
         
381
-        $action->setMethod($this->getControllerTg(), $objectName . '.' . $methodName, $actionParams);
381
+        $action->setMethod($this->getControllerTg(), $objectName.'.'.$methodName, $actionParams);
382 382
         
383 383
         $docComment = $method->getDocComment();
384
-        if(strpos($docComment, '@ajax') !== false){
384
+        if (strpos($docComment, '@ajax') !== false) {
385 385
             $action->setAjax(true);
386 386
         }
387
-        if(strpos($docComment, '@requireSaveMethod') !== false && method_exists($action, 'setRequireSaveMethod')){
387
+        if (strpos($docComment, '@requireSaveMethod') !== false && method_exists($action, 'setRequireSaveMethod')) {
388 388
             $action->setRequireSaveMethod(true);
389 389
         }
390
-        if(strpos($docComment, '@requireDeleteMethod') !== false && method_exists($action, 'setRequireDeleteMethod')){
390
+        if (strpos($docComment, '@requireDeleteMethod') !== false && method_exists($action, 'setRequireDeleteMethod')) {
391 391
             $action->setRequireDeleteMethod(true);
392 392
         }
393 393
         
@@ -416,9 +416,9 @@  discard block
 block discarded – undo
416 416
         
417 417
         $action->setParameters($actionParams);
418 418
         
419
-        list (, , $file) = explode('/', $App->controllerTg);
419
+        list (,, $file) = explode('/', $App->controllerTg);
420 420
         
421
-        $action->setParameter('addon', $App->getAddonName() . '.' . $file);
421
+        $action->setParameter('addon', $App->getAddonName().'.'.$file);
422 422
         $action->setParameter('idx', $idx);
423 423
         
424 424
         return $action;
@@ -436,44 +436,44 @@  discard block
 block discarded – undo
436 436
         
437 437
         $method = $action->getMethod();
438 438
         
439
-        if(! isset($method) || '' === $method){
439
+        if (!isset($method) || '' === $method) {
440 440
             return false;
441 441
         }
442 442
         
443 443
         list ($objectName,) = explode('.', $method);
444 444
         
445
-        if(! method_exists($this, $objectName)){
445
+        if (!method_exists($this, $objectName)) {
446 446
             /* @var $component AppComponent */
447 447
             $component = $this->app->getComponentByName($objectName);
448
-            if($component){
448
+            if ($component) {
449 449
                 $this->app->setCurrentComponent($component);
450 450
                 $objectController = $component->controller(false);
451 451
             }
452
-            else{
452
+            else {
453 453
                 header('HTTP/1.0 400 Bad Request');
454 454
                 throw new AppUnknownActionException($action);
455 455
             }
456 456
         }
457 457
         
458
-        if(! isset($component)){
458
+        if (!isset($component)) {
459 459
             $objectController = $this->{$objectName}(false);
460
-            if(! ($objectController instanceof AppController)){
460
+            if (!($objectController instanceof AppController)) {
461 461
                 return false;
462 462
             }
463 463
         }
464 464
         
465
-        try{
465
+        try {
466 466
             $returnedValue = $objectController->execAction($action);
467 467
         }
468
-        catch (AppAccessException $e){
468
+        catch (AppAccessException $e) {
469 469
             
470
-            if(! bab_isUserLogged() && $e->requireCredential){
470
+            if (!bab_isUserLogged() && $e->requireCredential) {
471 471
                 bab_requireCredential($e->getMessage());
472 472
             }
473
-            else{
474
-                if($this->isAjaxRequest()){
473
+            else {
474
+                if ($this->isAjaxRequest()) {
475 475
                     
476
-                    header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403);
476
+                    header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403);
477 477
                     
478 478
                     die(bab_json_encode(array(
479 479
                         'exception' => 'app_AccessException',
@@ -484,10 +484,10 @@  discard block
 block discarded – undo
484 484
                 $this->accessPage($e);
485 485
             }
486 486
         }
487
-        catch (AppSaveException $e){
487
+        catch (AppSaveException $e) {
488 488
             
489
-            if($this->isAjaxRequest()){
490
-                header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403);
489
+            if ($this->isAjaxRequest()) {
490
+                header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403);
491 491
                 header('Cache-Control: no-cache, must-revalidate');
492 492
                 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
493 493
                 header('Content-type: application/json');
@@ -499,32 +499,32 @@  discard block
 block discarded – undo
499 499
                 )));
500 500
             }
501 501
         }
502
-        catch (AppDeletedRecordException $e){
502
+        catch (AppDeletedRecordException $e) {
503 503
             $this->deletedItemPage($action, $e);
504 504
         }
505
-        catch (AppNotFoundException $e){
505
+        catch (AppNotFoundException $e) {
506 506
             $this->notFoundPage($action, $e);
507 507
         }
508
-        catch (ORMException $e){
508
+        catch (ORMException $e) {
509 509
             $this->errorPage($e);
510 510
         }
511
-        catch (\Exception $e){
511
+        catch (\Exception $e) {
512 512
             $this->unexpectedErrorPage($e);
513 513
         }
514 514
         
515 515
         $W = bab_Widgets();
516 516
         
517
-        if($returnedValue instanceof WidgetDisplayableInterface){
517
+        if ($returnedValue instanceof WidgetDisplayableInterface) {
518 518
             
519
-            if($returnedValue instanceof WidgetBabPage && ! $this->isAjaxRequest()){
519
+            if ($returnedValue instanceof WidgetBabPage && !$this->isAjaxRequest()) {
520 520
                 
521 521
                 // If the action returned a page, we display it.
522 522
                 $returnedValue->displayHtml();
523 523
             }
524
-            else{
524
+            else {
525 525
                 
526 526
                 $htmlCanvas = $W->HtmlCanvas();
527
-                if(self::$acceptJson){
527
+                if (self::$acceptJson) {
528 528
                     $itemId = $returnedValue->getId();
529 529
                     $returnArray = array(
530 530
                         $itemId => $returnedValue->display($htmlCanvas)
@@ -534,18 +534,18 @@  discard block
 block discarded – undo
534 534
                     header('Content-type: application/json');
535 535
                     die(bab_json_encode($returnArray));
536 536
                 }
537
-                else{
537
+                else {
538 538
                     header('Cache-Control: no-cache, must-revalidate');
539 539
                     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
540 540
                     header('Content-type: text/html');
541
-                    if($returnedValue instanceof WidgetPage && method_exists($returnedValue, 'getPageTitle')){
541
+                    if ($returnedValue instanceof WidgetPage && method_exists($returnedValue, 'getPageTitle')) {
542 542
                         $pageTitle = $returnedValue->getPageTitle();
543 543
                         
544
-                        if(method_exists($htmlCanvas, 'sendPageTitle')){
544
+                        if (method_exists($htmlCanvas, 'sendPageTitle')) {
545 545
                             $htmlCanvas->sendPageTitle($pageTitle);
546 546
                         }
547
-                        else{
548
-                            header('X-Cto-PageTitle: ' . $pageTitle);
547
+                        else {
548
+                            header('X-Cto-PageTitle: '.$pageTitle);
549 549
                         }
550 550
                     }
551 551
                     $html = $returnedValue->display($htmlCanvas);
@@ -553,15 +553,15 @@  discard block
 block discarded – undo
553 553
                 }
554 554
             }
555 555
         }
556
-        elseif(is_array($returnedValue)){
556
+        elseif (is_array($returnedValue)) {
557 557
             
558 558
             $htmlCanvas = $W->HtmlCanvas();
559 559
             $returnedArray = array();
560
-            foreach ($returnedValue as $key => &$item){
561
-                if($item instanceof WidgetDisplayableInterface){
560
+            foreach ($returnedValue as $key => &$item) {
561
+                if ($item instanceof WidgetDisplayableInterface) {
562 562
                     $returnedArray[$item->getId()] = $item->display($htmlCanvas);
563 563
                 }
564
-                else{
564
+                else {
565 565
                     $returnedArray[$key] = $item;
566 566
                 }
567 567
             }
@@ -570,9 +570,9 @@  discard block
 block discarded – undo
570 570
             header('Content-type: application/json');
571 571
             die(bab_convertStringFromDatabase(bab_json_encode($returnedArray), \bab_charset::UTF_8));
572 572
         }
573
-        elseif(true === $returnedValue || is_string($returnedValue)){
573
+        elseif (true === $returnedValue || is_string($returnedValue)) {
574 574
             
575
-            if($this->isAjaxRequest()){
575
+            if ($this->isAjaxRequest()) {
576 576
                 $body = bab_getBody();
577 577
                 $json = array();
578 578
                 $json['messages'] = array();
@@ -580,24 +580,24 @@  discard block
 block discarded – undo
580 580
                 unset($body->messages['toasts']);
581 581
                 $messages = $body->messages;
582 582
                 $errors = $body->errors;
583
-                foreach ($messages as $message){
583
+                foreach ($messages as $message) {
584 584
                     $json['messages'][] = array(
585 585
                         'level' => 'info',
586 586
                         'content' => $message,
587 587
                         'time' => 4000
588 588
                     );
589 589
                 }
590
-                foreach ($errors as $message){
590
+                foreach ($errors as $message) {
591 591
                     $json['messages'][] = array(
592 592
                         'level' => 'danger',
593 593
                         'content' => $message
594 594
                     );
595 595
                 }
596 596
                 $json['toasts'] = $toasts;
597
-                if($objectController->getReloadSelectors()){
597
+                if ($objectController->getReloadSelectors()) {
598 598
                     $json['reloadSelector'] = implode(',', $objectController->getReloadSelectors());
599 599
                 }
600
-                if($objectController->keepDialogOpened){
600
+                if ($objectController->keepDialogOpened) {
601 601
                     $json['keepDialogOpened'] = true;
602 602
                 }
603 603
                 echo bab_json_encode($json);
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
     
611 611
     private function deletedItemPage(WidgetAction $action, AppDeletedRecordException $e)
612 612
     {
613
-        if($this->isAjaxRequest()){
614
-            header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403);
613
+        if ($this->isAjaxRequest()) {
614
+            header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403);
615 615
             header('Cache-Control: no-cache, must-revalidate');
616 616
             header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
617 617
             header('Content-type: application/json');
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
                 'errorMessage' => bab_convertStringFromDatabase($e->getMessage(), 'UTF-8')
624 624
             )));
625 625
         }
626
-        header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404);
626
+        header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404);
627 627
         
628 628
         $App = app_App();
629 629
         $W = bab_Widgets();
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
             ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_ITEMS_CENTER));
646 646
         $section->addItems($W->Title($App->translate('Error'), 1), $W->Title(sprintf($App->translate('This %s has been deleted'), $e->getObjectTitle())));
647 647
         
648
-        if($e instanceof AppDeletedRecordException){
648
+        if ($e instanceof AppDeletedRecordException) {
649 649
             $section->addItems($e->getDeletedBy(), $e->getDeletedOn());
650 650
         }
651 651
         
@@ -654,8 +654,8 @@  discard block
 block discarded – undo
654 654
     
655 655
     private function notFoundPage(WidgetAction $action, AppNotFoundException $e)
656 656
     {
657
-        if($this->isAjaxRequest()){
658
-            $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle() . ' (' . $e->getId() . ')');
657
+        if ($this->isAjaxRequest()) {
658
+            $message = sprintf(app_translate('This %s does not exists'), $e->getObjectTitle().' ('.$e->getId().')');
659 659
             $json = array(
660 660
                 'messages' => array(
661 661
                     array(
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
             echo bab_json_encode($json);
668 668
             die();
669 669
         }
670
-        header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404);
670
+        header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404);
671 671
         header('Cache-Control: no-cache, must-revalidate');
672 672
         header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
673 673
         
@@ -696,8 +696,8 @@  discard block
 block discarded – undo
696 696
     
697 697
     private function unexpectedErrorPage(\Exception $e)
698 698
     {
699
-        if($this->isAjaxRequest()){
700
-            $message = sprintf(app_translate('An unexpected error occured') . ':' . '%s', $e->getMessage());
699
+        if ($this->isAjaxRequest()) {
700
+            $message = sprintf(app_translate('An unexpected error occured').':'.'%s', $e->getMessage());
701 701
             $json = array(
702 702
                 'messages' => array(
703 703
                     array(
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
             echo bab_json_encode($json);
710 710
             die();
711 711
         }
712
-        header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500);
712
+        header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500);
713 713
         header('Cache-Control: no-cache, must-revalidate');
714 714
         header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
715 715
         
@@ -733,25 +733,25 @@  discard block
 block discarded – undo
733 733
             ->addClass('widget-50pc alert alert-danger')
734 734
             ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL));
735 735
         
736
-        $logCode = '#' . hrtime(true);
736
+        $logCode = '#'.hrtime(true);
737 737
         $message = addcslashes($e->getMessage(), "\000..\037\177..\377\\");
738 738
         $trace = addcslashes($e->getTraceAsString(), "\000..\037\177..\377\\");
739 739
         
740
-        error_log(sprintf('Error %s : %s', $logCode, $message) . PHP_EOL . $trace);
740
+        error_log(sprintf('Error %s : %s', $logCode, $message).PHP_EOL.$trace);
741 741
         
742 742
         $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)));
743 743
         
744
-        if(bab_isUserAdministrator()){
744
+        if (bab_isUserAdministrator()) {
745 745
             $contentBox->addItem($W->Section('Stack trace', $stackTraceBox = $W->FlexItems($W->Label($message)
746 746
                 ->addClass('widget-description'))
747 747
                 ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL))
748 748
                 ->setFoldable(true, true));
749 749
             $traces = explode("\n", $e->getTraceAsString());
750
-            foreach ($traces as $trace){
750
+            foreach ($traces as $trace) {
751 751
                 $stackTraceBox->addItem($W->Label($trace));
752 752
             }
753 753
         }
754
-        else{
754
+        else {
755 755
             $section->addItem($W->Label($App->translate('Please contact the administrator')));
756 756
         }
757 757
         
@@ -760,8 +760,8 @@  discard block
 block discarded – undo
760 760
     
761 761
     private function errorPage(\Exception $e)
762 762
     {
763
-        if($this->isAjaxRequest()){
764
-            $message = sprintf(app_translate('An unexpected error occured') . ':' . '%s', $e->getMessage());
763
+        if ($this->isAjaxRequest()) {
764
+            $message = sprintf(app_translate('An unexpected error occured').':'.'%s', $e->getMessage());
765 765
             $json = array(
766 766
                 'messages' => array(
767 767
                     array(
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
             echo bab_json_encode($json);
774 774
             die();
775 775
         }
776
-        header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal server error', true, 500);
776
+        header($_SERVER['SERVER_PROTOCOL'].' 500 Internal server error', true, 500);
777 777
         header('Cache-Control: no-cache, must-revalidate');
778 778
         header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
779 779
         
@@ -797,25 +797,25 @@  discard block
 block discarded – undo
797 797
             ->addClass('widget-50pc alert alert-danger')
798 798
             ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL));
799 799
         
800
-        $logCode = '#' . hrtime(true);
800
+        $logCode = '#'.hrtime(true);
801 801
         $message = addcslashes($e->getMessage(), "\000..\037\177..\377\\");
802 802
         $trace = addcslashes($e->getTraceAsString(), "\000..\037\177..\377\\");
803 803
         
804
-        error_log(sprintf('Error %s : %s', $logCode, $message) . PHP_EOL . $trace);
804
+        error_log(sprintf('Error %s : %s', $logCode, $message).PHP_EOL.$trace);
805 805
         
806 806
         $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)));
807 807
         
808
-        if(bab_isUserAdministrator()){
808
+        if (bab_isUserAdministrator()) {
809 809
             $contentBox->addItem($W->Section('Stack trace', $stackTraceBox = $W->FlexItems($W->Label($message)
810 810
                 ->addClass('widget-description'))
811 811
                 ->setDirection(WidgetFlexLayout::FLEX_DIRECTION_COL))
812 812
                 ->setFoldable(true, true));
813 813
             $traces = explode("\n", $e->getTraceAsString());
814
-            foreach ($traces as $trace){
814
+            foreach ($traces as $trace) {
815 815
                 $stackTraceBox->addItem($W->Label($trace));
816 816
             }
817 817
         }
818
-        else{
818
+        else {
819 819
             $section->addItem($W->Label($App->translate('Please contact the administrator')));
820 820
         }
821 821
         
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
     
825 825
     private function accessPage(\Exception $e)
826 826
     {
827
-        if($this->isAjaxRequest()){
827
+        if ($this->isAjaxRequest()) {
828 828
             $message = $e->getMessage();
829 829
             $json = array(
830 830
                 'messages' => array(
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
             echo bab_json_encode($json);
838 838
             die();
839 839
         }
840
-        header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden', true, 403);
840
+        header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden', true, 403);
841 841
         header('Cache-Control: no-cache, must-revalidate');
842 842
         header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
843 843
         
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
      */
875 875
     public function requireSaveMethod()
876 876
     {
877
-        if('GET' === $_SERVER['REQUEST_METHOD']){
877
+        if ('GET' === $_SERVER['REQUEST_METHOD']) {
878 878
             throw new AppException('Method not allowed');
879 879
         }
880 880
         
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
      */
890 890
     public function requireDeleteMethod()
891 891
     {
892
-        if('GET' === $_SERVER['REQUEST_METHOD']){
892
+        if ('GET' === $_SERVER['REQUEST_METHOD']) {
893 893
             throw new AppException('Method not allowed');
894 894
         }
895 895
         
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
             'position' => $position
922 922
         );
923 923
         $babBody = bab_getBody();
924
-        if(! isset($babBody->messages['toasts'])){
924
+        if (!isset($babBody->messages['toasts'])) {
925 925
             $babBody->messages['toasts'] = array();
926 926
         }
927 927
         $babBody->messages['toasts'][] = $toast;
Please login to merge, or discard this patch.