Passed
Push — master ( e93494...c85701 )
by Robin
04:03
created
programs/ui/page.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
             // all widget have static id to not change id of others widgets in page
288 288
 
289
-            $infoMessages =  $_SESSION['app_msginfo'];
289
+            $infoMessages = $_SESSION['app_msginfo'];
290 290
             foreach ($infoMessages as $infoLine) {
291 291
                 $this->App()->Controller()->addMessage($infoLine);
292 292
             }
@@ -304,6 +304,6 @@  discard block
 block discarded – undo
304 304
          * @see	app.jquery.js#window.babAddonLibApp.numberFormat
305 305
          */
306 306
         $this->setMetadata('numberFormatSeparator', mb_substr($str, 1, 1));
307
-        $this->setMetadata('numberFormatPrecision', mb_strlen($str) -2);
307
+        $this->setMetadata('numberFormatPrecision', mb_strlen($str) - 2);
308 308
     }
309 309
 }
Please login to merge, or discard this patch.
programs/ui/ui.helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		if (empty($description)) {
48 48
 			$description = $field->getName();
49 49
 		}
50
-		$fieldLabel = $W->Label($description . ':');
50
+		$fieldLabel = $W->Label($description.':');
51 51
 
52 52
 		if ($field instanceof ORM_DateField) {
53 53
 			$widget = $W->DatePicker();
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		if (empty($description)) {
104 104
 			$description = $field->getName();
105 105
 		}
106
-		$fieldLabel = $W->Label($description . ':');
106
+		$fieldLabel = $W->Label($description.':');
107 107
 
108 108
 		if ($field instanceof ORM_DateField) {
109 109
 			$widget = $W->PeriodPicker();
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	$nbOptions = 0;
207 207
 	foreach ($iterator as $record) {
208 208
 		if (isset($record->code)) {
209
-			$optionText = $record->code . ' - ' . $record->$fieldName;
209
+			$optionText = $record->code.' - '.$record->$fieldName;
210 210
 		} else {
211 211
 			$optionText = $record->$fieldName;
212 212
 		}
Please login to merge, or discard this patch.
programs/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     if (null === $url) {
113 113
         $script = '<script type="text/javascript">';
114 114
         if (isset($message)) {
115
-            $script .= 'alert("' . bab_toHtml($message, BAB_HTML_JS) . '");';
115
+            $script .= 'alert("'.bab_toHtml($message, BAB_HTML_JS).'");';
116 116
         }
117 117
         $script .= 'history.back();';
118 118
         $script .= '</script>';
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $url = $url->url();
125 125
     }
126 126
     if (!empty($babBody->msgerror)) {
127
-        $url .=  '&msgerror=' . urlencode($babBody->msgerror);
127
+        $url .= '&msgerror='.urlencode($babBody->msgerror);
128 128
     }
129 129
     if (isset($message)) {
130 130
         $lines = explode("\n", $message);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         }
134 134
     }
135 135
 
136
-    header('Location: ' . $url);
136
+    header('Location: '.$url);
137 137
     die;
138 138
 }
139 139
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
  */
166 166
 function app_fileUploadError($error)
167 167
 {
168
-    switch($error) {
168
+    switch ($error) {
169 169
         case UPLOAD_ERR_OK:
170 170
             return null;
171 171
 
Please login to merge, or discard this patch.
programs/customsection.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
         if (is_array($parameters)) {
319 319
             $params = array();
320 320
             foreach ($parameters as $key => $value) {
321
-                $params[] = $key . '=' . $value;
321
+                $params[] = $key.'='.$value;
322 322
             }
323
-            $rawField .= ':' . implode(';', $params);
323
+            $rawField .= ':'.implode(';', $params);
324 324
         }
325 325
         array_push($rawFields, $rawField);
326 326
         $this->fields = implode(',', $rawFields);
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             if (empty($rawField)) {
340 340
                 continue;
341 341
             }
342
-            list($fieldName, ) = explode(':', $rawField);
342
+            list($fieldName,) = explode(':', $rawField);
343 343
 
344 344
             if ($removedFieldName == $fieldName) {
345 345
                 continue;
Please login to merge, or discard this patch.
programs/customsection.ctrl.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 
24 24
 
25
-require_once APP_CTRL_PATH . '/record.ctrl.php';
25
+require_once APP_CTRL_PATH.'/record.ctrl.php';
26 26
 
27 27
 
28 28
 /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         foreach ($allViewSections as $viewSection) {
59 59
             $fields = $viewSection->getFields();
60 60
             foreach ($fields as $field) {
61
-                $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id;
61
+                $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id;
62 62
             }
63 63
         }
64 64
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         bab_Sort::asort($availableFields, 'description', bab_Sort::CASE_INSENSITIVE);
82 82
 
83 83
         foreach ($availableFields as $field) {
84
-            $fieldName =  $field['name'];
84
+            $fieldName = $field['name'];
85 85
             $fieldDescription = $field['description'];
86 86
 
87 87
             $used = isset($allViewFieldNames[$fieldName]);
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $recordSet = $this->getRecordSet();
391 391
         $record = $recordSet->request($id);
392 392
 
393
-        $object = $record->object . 'Set';
393
+        $object = $record->object.'Set';
394 394
 
395 395
         $objectRecordSet = $App->$object();
396 396
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $recordSet = $this->getRecordSet();
465 465
         $record = $recordSet->request($data['id']);
466 466
 
467
-        $object = $record->object . 'Set';
467
+        $object = $record->object.'Set';
468 468
 
469 469
         $objectRecordSet = $App->$object();
470 470
 
@@ -536,17 +536,17 @@  discard block
 block discarded – undo
536 536
         $nbCol = 0;
537 537
         foreach ($customSections as $customSection) {
538 538
 
539
-            list(, , $nbCol) = explode('-', $customSection->sizePolicy);
539
+            list(,, $nbCol) = explode('-', $customSection->sizePolicy);
540 540
 
541 541
             $currentColumn += $nbCol;
542 542
 
543 543
             $sectionSection = $W->Section(
544
-                $customSection->name . ' (' . $customSection->rank . ')',
545
-                $sectionBox = $W->VBoxItems($W->Hidden()->setName('#' . $customSection->id))
544
+                $customSection->name.' ('.$customSection->rank.')',
545
+                $sectionBox = $W->VBoxItems($W->Hidden()->setName('#'.$customSection->id))
546 546
             );
547 547
             $sectionSection->addClass('app-custom-section');
548 548
             $sectionSection->addClass($customSection->classname);
549
-            $sectionSection->setSizePolicy($customSection->sizePolicy . ' widget-sameheight');
549
+            $sectionSection->setSizePolicy($customSection->sizePolicy.' widget-sameheight');
550 550
 
551 551
             $row->addItem($sectionSection);
552 552
 
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                 $fieldItem = $W->HBoxItems(
589 589
                     $W->Label($fieldDescription)->setSizePolicy('maximum')->addClass('icon', Func_Icons::ACTIONS_ZOOM_FIT_HEIGHT),
590 590
                     $W->HBoxItems(
591
-                        $W->Hidden()->setName($customSection->id . '.' . $fieldId)->setValue($field['name']),
591
+                        $W->Hidden()->setName($customSection->id.'.'.$fieldId)->setValue($field['name']),
592 592
                         $W->Link('', $customSectionCtrl->editDisplayField($customSection->id, $field['name']))
593 593
                             ->addClass('icon', Func_Icons::ACTIONS_DOCUMENT_EDIT)
594 594
                             ->setOpenMode(Widget_Link::OPEN_DIALOG),
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
         }
666 666
 
667 667
         header('Content-type: application/json');
668
-        header('Content-Disposition: attachment; filename="' . $object . '.' . ($view === '' ? 'default' : $view) . '.json"'."\n");
668
+        header('Content-Disposition: attachment; filename="'.$object.'.'.($view === '' ? 'default' : $view).'.json"'."\n");
669 669
 
670 670
         $json = bab_json_encode($sectionsValues);
671 671
         $json = bab_convertStringFromDatabase($json, bab_charset::UTF_8);
Please login to merge, or discard this patch.
programs/accessmanager.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     public function hasNoAccess(app_RecordSet $recordSet, $accessType, $user = null)
95 95
     {
96 96
         $criterion = $this->getAccessCriterion($recordSet, $accessType, $user);
97
-        if (! $criterion instanceof ORM_FalseCriterion) {
97
+        if (!$criterion instanceof ORM_FalseCriterion) {
98 98
             return false;
99 99
         }
100 100
         return true;
Please login to merge, or discard this patch.
programs/init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 
26 26
 
27
-require_once dirname(__FILE__). '/functions.php';
27
+require_once dirname(__FILE__).'/functions.php';
28 28
 
29 29
 
30 30
 function LibApp_upgrade($sVersionBase, $sVersionIni)
Please login to merge, or discard this patch.
programs/link.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function joinSource($sourceClass)
79 79
 	{
80
-	    if (get_class($this->sourceId) !== $sourceClass . 'Set') {
81
-    	    $this->hasOne('sourceId', $sourceClass . 'Set');
80
+	    if (get_class($this->sourceId) !== $sourceClass.'Set') {
81
+    	    $this->hasOne('sourceId', $sourceClass.'Set');
82 82
     		$this->join('sourceId');
83 83
 	    }
84 84
 	}
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function joinTarget($targetClass = null)
91 91
 	{
92
-	    if (get_class($this->targetId) !== $targetClass . 'Set') {
93
-    		$this->hasOne('targetId', $targetClass . 'Set');
92
+	    if (get_class($this->targetId) !== $targetClass.'Set') {
93
+    		$this->hasOne('targetId', $targetClass.'Set');
94 94
     		$this->join('targetId');
95 95
 	    }
96 96
 	}
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 		}
257 257
 
258 258
 		if ($deleteTarget) {
259
-			foreach($set->select($criteria) as $link) {
259
+			foreach ($set->select($criteria) as $link) {
260 260
 
261 261
 				$className = $link->targetClass.'Set';
262 262
 
Please login to merge, or discard this patch.
programs/define.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@
 block discarded – undo
21 21
  * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr})
22 22
  */
23 23
 
24
-define('APP_PHP_PATH', dirname(__FILE__) . '/');
25
-define('APP_SET_PATH', dirname(__FILE__) . '/');
26
-define('APP_UI_PATH', dirname(__FILE__) . '/ui/');
27
-define('APP_WIDGETS_PATH', APP_UI_PATH . 'widgets/');
28
-define('APP_CTRL_PATH', dirname(__FILE__) . '/');
24
+define('APP_PHP_PATH', dirname(__FILE__).'/');
25
+define('APP_SET_PATH', dirname(__FILE__).'/');
26
+define('APP_UI_PATH', dirname(__FILE__).'/ui/');
27
+define('APP_WIDGETS_PATH', APP_UI_PATH.'widgets/');
28
+define('APP_CTRL_PATH', dirname(__FILE__).'/');
29 29
 
30
-require_once APP_PHP_PATH . 'base.class.php';
31
-require_once APP_UI_PATH . 'base.ui.php';
30
+require_once APP_PHP_PATH.'base.class.php';
31
+require_once APP_UI_PATH.'base.ui.php';
32 32
 
33
-require_once $GLOBALS['babInstallPath'] . 'utilit/dateTime.php';
33
+require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
34 34
 
35 35
 
36 36
 
Please login to merge, or discard this patch.