Completed
Push — master ( ec1681...68c045 )
by Michael
02:41
created
class/pear/Calendar/tests/second_test.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     public function testPrevDay_Array()
28 28
     {
29 29
         $this->assertEqual([
30
-                               'year'   => 2003,
31
-                               'month'  => 10,
32
-                               'day'    => 24,
33
-                               'hour'   => 0,
34
-                               'minute' => 0,
35
-                               'second' => 0,
36
-                           ], $this->cal->prevDay('array'));
30
+                                'year'   => 2003,
31
+                                'month'  => 10,
32
+                                'day'    => 24,
33
+                                'hour'   => 0,
34
+                                'minute' => 0,
35
+                                'second' => 0,
36
+                            ], $this->cal->prevDay('array'));
37 37
     }
38 38
 }
39 39
 
Please login to merge, or discard this patch.
class/pear/Calendar/tests/hour_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     public function testPrevDay_Array()
28 28
     {
29 29
         $this->assertEqual([
30
-                               'year'   => 2003,
31
-                               'month'  => 10,
32
-                               'day'    => 24,
33
-                               'hour'   => 0,
34
-                               'minute' => 0,
35
-                               'second' => 0,
36
-                           ], $this->cal->prevDay('array'));
30
+                                'year'   => 2003,
31
+                                'month'  => 10,
32
+                                'day'    => 24,
33
+                                'hour'   => 0,
34
+                                'minute' => 0,
35
+                                'second' => 0,
36
+                            ], $this->cal->prevDay('array'));
37 37
     }
38 38
 
39 39
     public function testPrevMinute()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfHour.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     public function testSelection()
118 118
     {
119
-        require_once CALENDAR_ROOT . 'Minute.php';
119
+        require_once CALENDAR_ROOT.'Minute.php';
120 120
         $selection = [new Calendar_Minute(2003, 10, 25, 13, 32)];
121 121
         $this->cal->build($selection);
122 122
         $i = 0;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/week_firstday_0_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
     public function testPrevDay_Array()
35 35
     {
36 36
         $this->assertEqual([
37
-                               'year'   => 2003,
38
-                               'month'  => 10,
39
-                               'day'    => 8,
40
-                               'hour'   => 0,
41
-                               'minute' => 0,
42
-                               'second' => 0,
43
-                           ], $this->cal->prevDay('array'));
37
+                                'year'   => 2003,
38
+                                'month'  => 10,
39
+                                'day'    => 8,
40
+                                'hour'   => 0,
41
+                                'minute' => 0,
42
+                                'second' => 0,
43
+                            ], $this->cal->prevDay('array'));
44 44
     }
45 45
 
46 46
     public function testThisDay()
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 //
3 3
 define('CALENDAR_FIRST_DAY_OF_WEEK', 0); //force firstDay = Sunday
4 4
 
5
-require_once __DIR__ . '/simple_include.php';
6
-require_once __DIR__ . '/calendar_include.php';
5
+require_once __DIR__.'/simple_include.php';
6
+require_once __DIR__.'/calendar_include.php';
7 7
 
8
-require_once __DIR__ . '/./calendar_test.php';
8
+require_once __DIR__.'/./calendar_test.php';
9 9
 
10 10
 /**
11 11
  * Class TestOfWeek_firstday_0.
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
     public function testSelection()
277 277
     {
278
-        require_once CALENDAR_ROOT . 'Day.php';
278
+        require_once CALENDAR_ROOT.'Day.php';
279 279
         $selection = [Calendar_Factory::create('Day', 2003, 10, 6)];
280 280
         $this->cal->build($selection);
281 281
         $i = 1;
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
     public function testSelectionCornerCase()
292 292
     {
293
-        require_once CALENDAR_ROOT . 'Day.php';
293
+        require_once CALENDAR_ROOT.'Day.php';
294 294
         $selectedDays = [
295 295
             Calendar_Factory::create('Day', 2003, 12, 28),
296 296
             Calendar_Factory::create('Day', 2003, 12, 29),
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             Calendar_Factory::create('Day', 2004, 01, 02),
301 301
             Calendar_Factory::create('Day', 2004, 01, 03),
302 302
         ];
303
-        $this->cal    = Calendar_Factory::create('Week', 2003, 12, 31, 0);
303
+        $this->cal = Calendar_Factory::create('Week', 2003, 12, 31, 0);
304 304
         $this->cal->build($selectedDays);
305 305
         while ($Day = $this->cal->fetch()) {
306 306
             $this->assertTrue($Day->isSelected());
Please login to merge, or discard this patch.
class/pear/Calendar/tests/month_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
     public function testPrevDay_Array()
38 38
     {
39 39
         $this->assertEqual([
40
-                               'year'   => 2003,
41
-                               'month'  => 9,
42
-                               'day'    => 30,
43
-                               'hour'   => 0,
44
-                               'minute' => 0,
45
-                               'second' => 0,
46
-                           ], $this->cal->prevDay('array'));
40
+                                'year'   => 2003,
41
+                                'month'  => 9,
42
+                                'day'    => 30,
43
+                                'hour'   => 0,
44
+                                'minute' => 0,
45
+                                'second' => 0,
46
+                            ], $this->cal->prevDay('array'));
47 47
     }
48 48
 
49 49
     public function testThisDay()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMonth.
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
     public function testSelection()
153 153
     {
154
-        require_once CALENDAR_ROOT . 'Day.php';
154
+        require_once CALENDAR_ROOT.'Day.php';
155 155
         $selection = [new Calendar_Day(2003, 10, 25)];
156 156
         $this->cal->build($selection);
157 157
         $i = 1;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/month_weekdays_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
     public function testPrevDay_Array()
33 33
     {
34 34
         $this->assertEqual([
35
-                               'year'   => 2003,
36
-                               'month'  => 9,
37
-                               'day'    => 30,
38
-                               'hour'   => 0,
39
-                               'minute' => 0,
40
-                               'second' => 0,
41
-                           ], $this->cal->prevDay('array'));
35
+                                'year'   => 2003,
36
+                                'month'  => 9,
37
+                                'day'    => 30,
38
+                                'hour'   => 0,
39
+                                'minute' => 0,
40
+                                'second' => 0,
41
+                            ], $this->cal->prevDay('array'));
42 42
     }
43 43
 
44 44
     public function testThisDay()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfMonthWeekdays.
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
     public function testSelection()
148 148
     {
149
-        require_once CALENDAR_ROOT . 'Day.php';
149
+        require_once CALENDAR_ROOT.'Day.php';
150 150
         $selection = [new Calendar_Day(2003, 10, 25)];
151 151
         $this->cal->build($selection);
152 152
         $daysInPrevMonth = (0 == CALENDAR_FIRST_DAY_OF_WEEK) ? 3 : 2;
Please login to merge, or discard this patch.
class/pear/Calendar/tests/day_test.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
     public function testPrevDay_Array()
28 28
     {
29 29
         $this->assertEqual([
30
-                               'year'   => 2003,
31
-                               'month'  => 10,
32
-                               'day'    => 24,
33
-                               'hour'   => 0,
34
-                               'minute' => 0,
35
-                               'second' => 0,
36
-                           ], $this->cal->prevDay('array'));
30
+                                'year'   => 2003,
31
+                                'month'  => 10,
32
+                                'day'    => 24,
33
+                                'hour'   => 0,
34
+                                'minute' => 0,
35
+                                'second' => 0,
36
+                            ], $this->cal->prevDay('array'));
37 37
     }
38 38
 
39 39
     public function testPrevHour()
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //
3 3
 
4
-require_once __DIR__ . '/simple_include.php';
5
-require_once __DIR__ . '/calendar_include.php';
4
+require_once __DIR__.'/simple_include.php';
5
+require_once __DIR__.'/calendar_include.php';
6 6
 
7
-require_once __DIR__ . '/./calendar_test.php';
7
+require_once __DIR__.'/./calendar_test.php';
8 8
 
9 9
 /**
10 10
  * Class TestOfDay.
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     public function testSelection()
133 133
     {
134
-        require_once CALENDAR_ROOT . 'Hour.php';
134
+        require_once CALENDAR_ROOT.'Hour.php';
135 135
         $selection = [new Calendar_Hour(2003, 10, 25, 13)];
136 136
         $this->cal->build($selection);
137 137
         $i = 0;
Please login to merge, or discard this patch.
class/form/spin/formspin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function setMin($min)
203 203
     {
204
-        $this->_min = (int)$min;
204
+        $this->_min = (int) $min;
205 205
     }
206 206
     /*-----------------------------------------------------------------*/
207 207
     /**
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function setMax($max)
221 221
     {
222
-        $this->_max = (int)$max;
222
+        $this->_max = (int) $max;
223 223
     }
224 224
 
225 225
     /*-----------------------------------------------------------------*/
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function setSmallIncrement($smallIncrement)
243 243
     {
244
-        $this->_smallIncrement = (int)$smallIncrement;
244
+        $this->_smallIncrement = (int) $smallIncrement;
245 245
         if ($this->_smallIncrement == 0) {
246 246
             $this->_smallIncrement = 1;
247 247
         }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function setLargeIncrement($largeIncrement)
265 265
     {
266
-        $this->_largeIncrement = (int)$largeIncrement;
266
+        $this->_largeIncrement = (int) $largeIncrement;
267 267
         if ($this->_largeIncrement == 0) {
268 268
             $this->_largeIncrement = 10;
269 269
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
405 405
 
406 406
         $prefixe  = $this->getName();
407
-        $prefixe2 = 'spin' . $prefixe;
407
+        $prefixe2 = 'spin'.$prefixe;
408 408
 
409 409
         $smallIncrement = $this->getSmallIncrement();
410 410
         $largeIncrement = $this->getLargeIncrement();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $t = [];
424 424
 
425 425
         if ($this->_loadJS) {
426
-            $js  = $sSpinFolder . '/js/spin.js';
426
+            $js  = $sSpinFolder.'/js/spin.js';
427 427
             $t[] = "<script src='{$js}' type='text/javascript'></script>";
428 428
         }
429 429
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         //-------------------------------------------------------
469 469
 
470 470
         $t[] = '  </tr>';
471
-        $t[] = '</table>' . "\n";
471
+        $t[] = '</table>'."\n";
472 472
         $t[] = '</div>';
473 473
         //-------------------------------------------
474 474
         $html = implode("\n", $t);
Please login to merge, or discard this patch.
class/ExtcalPersistableObjectHandler.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
         if (is_array($this->keyName)) {
101 101
             $criteria = new CriteriaCompo();
102 102
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
103
-                $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i]));
103
+                $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i]));
104 104
             }
105 105
         } else {
106
-            $criteria = new Criteria($this->keyName, (int)$id);
106
+            $criteria = new Criteria($this->keyName, (int) $id);
107 107
         }
108 108
         $criteria->setLimit(1);
109 109
         $objectArray = $this->getObjects($criteria, false, true);
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $ret   = [];
129 129
         $limit = $start = 0;
130
-        $sql   = 'SELECT * FROM ' . $this->table;
130
+        $sql   = 'SELECT * FROM '.$this->table;
131 131
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
132
-            $sql .= ' ' . $criteria->renderWhere();
132
+            $sql .= ' '.$criteria->renderWhere();
133 133
             if ($criteria->getSort() != '') {
134
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
134
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
135 135
             }
136 136
             $limit = $criteria->getLimit();
137 137
             $start = $criteria->getStart();
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     $ret[] = $obj;
167 167
                 } else {
168 168
                     $row  = [];
169
-                    $vars =& $obj->getVars();
169
+                    $vars = & $obj->getVars();
170 170
                     foreach (array_keys($vars) as $i) {
171 171
                         $row[$i] = $obj->getVar($i);
172 172
                     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                     $ret[$myrow[$this->keyName]] = $obj;
178 178
                 } else {
179 179
                     $row  = [];
180
-                    $vars =& $obj->getVars();
180
+                    $vars = & $obj->getVars();
181 181
                     foreach (array_keys($vars) as $i) {
182 182
                         $row[$i] = $obj->getVar($i);
183 183
                     }
@@ -210,15 +210,15 @@  discard block
 block discarded – undo
210 210
             $criteria->setSort($this->identifierName);
211 211
         }
212 212
 
213
-        $sql = 'SELECT ' . $this->keyName;
213
+        $sql = 'SELECT '.$this->keyName;
214 214
         if (!empty($this->identifierName)) {
215
-            $sql .= ', ' . $this->identifierName;
215
+            $sql .= ', '.$this->identifierName;
216 216
         }
217
-        $sql .= ' FROM ' . $this->table;
217
+        $sql .= ' FROM '.$this->table;
218 218
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
219
-            $sql .= ' ' . $criteria->renderWhere();
219
+            $sql .= ' '.$criteria->renderWhere();
220 220
             if ($criteria->getSort() != '') {
221
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
221
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
222 222
             }
223 223
             $limit = $criteria->getLimit();
224 224
             $start = $criteria->getStart();
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
252 252
             if ($criteria->groupby != '') {
253 253
                 $groupby = true;
254
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
254
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
255 255
             }
256 256
         }
257
-        $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table;
257
+        $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
258 258
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
259
-            $sql .= ' ' . $criteria->renderWhere();
259
+            $sql .= ' '.$criteria->renderWhere();
260 260
             if ($criteria->groupby != '') {
261 261
                 $sql .= $criteria->getGroupby();
262 262
             }
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
         if (is_array($this->keyName)) {
293 293
             $clause = [];
294 294
             for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) {
295
-                $clause[] = $this->keyName[$i] . ' = ' . $id[$i];
295
+                $clause[] = $this->keyName[$i].' = '.$id[$i];
296 296
             }
297 297
             $whereclause = implode(' AND ', $clause);
298 298
         } else {
299
-            $whereclause = $this->keyName . ' = ' . $id;
299
+            $whereclause = $this->keyName.' = '.$id;
300 300
         }
301
-        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
301
+        $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause;
302 302
         if (false !== $force) {
303 303
             $result = $this->db->queryF($sql);
304 304
         } else {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             }
330 330
 
331 331
             if (!($obj instanceof $this->className && class_exists($this->className))) {
332
-                $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className);
332
+                $obj->setErrors(get_class($obj).' Differs from '.$this->className);
333 333
 
334 334
                 return false;
335 335
             }
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
         foreach ($obj->cleanVars as $k => $v) {
342 342
             if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
343
-                $cleanvars[$k] = (int)$v;
343
+                $cleanvars[$k] = (int) $v;
344 344
             } elseif (is_array($v)) {
345 345
                 $cleanvars[$k] = $this->db->quoteString(implode(',', $v));
346 346
             } else {
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
         if ($obj->isNew()) {
351 351
             if (!is_array($this->keyName)) {
352 352
                 if ($cleanvars[$this->keyName] < 1) {
353
-                    $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq');
353
+                    $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
354 354
                 }
355 355
             }
356
-            $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')';
356
+            $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')';
357 357
         } else {
358
-            $sql = 'UPDATE ' . $this->table . ' SET';
358
+            $sql = 'UPDATE '.$this->table.' SET';
359 359
             foreach ($cleanvars as $key => $value) {
360 360
                 if ((!is_array($this->keyName) && $key == $this->keyName)
361 361
                     || (is_array($this->keyName)
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                 if (isset($notfirst)) {
366 366
                     $sql .= ',';
367 367
                 }
368
-                $sql      .= ' ' . $key . ' = ' . $value;
368
+                $sql .= ' '.$key.' = '.$value;
369 369
                 $notfirst = true;
370 370
             }
371 371
             if (is_array($this->keyName)) {
@@ -374,12 +374,12 @@  discard block
 block discarded – undo
374 374
                     if ($i > 0) {
375 375
                         $whereclause .= ' AND ';
376 376
                     }
377
-                    $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]);
377
+                    $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]);
378 378
                 }
379 379
             } else {
380
-                $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
380
+                $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName);
381 381
             }
382
-            $sql .= ' WHERE ' . $whereclause;
382
+            $sql .= ' WHERE '.$whereclause;
383 383
         }
384 384
         if (false !== $force) {
385 385
             $result = $this->db->queryF($sql);
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
      */
409 409
     public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false)
410 410
     {
411
-        $setClause = $fieldname . ' = ';
411
+        $setClause = $fieldname.' = ';
412 412
         if (is_numeric($fieldvalue)) {
413 413
             $setClause .= $fieldvalue;
414 414
         } elseif (is_array($fieldvalue)) {
@@ -416,9 +416,9 @@  discard block
 block discarded – undo
416 416
         } else {
417 417
             $setClause .= $this->db->quoteString($fieldvalue);
418 418
         }
419
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause;
419
+        $sql = 'UPDATE '.$this->table.' SET '.$setClause;
420 420
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
421
-            $sql .= ' ' . $criteria->renderWhere();
421
+            $sql .= ' '.$criteria->renderWhere();
422 422
         }
423 423
         if (false !== $force) {
424 424
             $result = $this->db->queryF($sql);
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
      */
443 443
     public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true)
444 444
     {
445
-        $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue;
445
+        $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue;
446 446
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
447
-            $sql .= ' ' . $criteria->renderWhere();
447
+            $sql .= ' '.$criteria->renderWhere();
448 448
         }
449 449
         if (false !== $force) {
450 450
             $result = $this->db->queryF($sql);
@@ -471,8 +471,8 @@  discard block
 block discarded – undo
471 471
     public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false)
472 472
     {
473 473
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
474
-            $sql = 'DELETE FROM ' . $this->table;
475
-            $sql .= ' ' . $criteria->renderWhere();
474
+            $sql = 'DELETE FROM '.$this->table;
475
+            $sql .= ' '.$criteria->renderWhere();
476 476
             if (!$this->db->query($sql)) {
477 477
                 return false;
478 478
             }
@@ -606,8 +606,8 @@  discard block
 block discarded – undo
606 606
      */
607 607
     public function updateCounter($fieldname, $criteria, $op = '+')
608 608
     {
609
-        $sql    = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1';
610
-        $sql    .= ' ' . $criteria->renderWhere();
609
+        $sql    = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1';
610
+        $sql .= ' '.$criteria->renderWhere();
611 611
         $result = $this->db->queryF($sql);
612 612
         if (!$result) {
613 613
             return false;
@@ -629,12 +629,12 @@  discard block
 block discarded – undo
629 629
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
630 630
             if ($criteria->groupby != '') {
631 631
                 $groupby = true;
632
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
632
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
633 633
             }
634 634
         }
635
-        $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table;
635
+        $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table;
636 636
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
637
-            $sql .= ' ' . $criteria->renderWhere();
637
+            $sql .= ' '.$criteria->renderWhere();
638 638
             if ($criteria->groupby != '') {
639 639
                 $sql .= $criteria->getGroupby();
640 640
             }
@@ -670,12 +670,12 @@  discard block
 block discarded – undo
670 670
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
671 671
             if ($criteria->groupby != '') {
672 672
                 $groupby = true;
673
-                $field   = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
673
+                $field   = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
674 674
             }
675 675
         }
676
-        $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table;
676
+        $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table;
677 677
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
678
-            $sql .= ' ' . $criteria->renderWhere();
678
+            $sql .= ' '.$criteria->renderWhere();
679 679
             if ($criteria->groupby != '') {
680 680
                 $sql .= $criteria->getGroupby();
681 681
             }
@@ -708,9 +708,9 @@  discard block
 block discarded – undo
708 708
     {
709 709
         $field = '';
710 710
 
711
-        $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table;
711
+        $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table;
712 712
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
713
-            $sql .= ' ' . $criteria->renderWhere();
713
+            $sql .= ' '.$criteria->renderWhere();
714 714
         }
715 715
         $result = $this->db->query($sql);
716 716
         if (!$result) {
Please login to merge, or discard this patch.
class/etablissement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 //Kraven 30
21 21
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
22 22
 
23
-require_once XOOPS_ROOT_PATH . '/kernel/object.php';
23
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
24 24
 
25 25
 //class ExtcalEvent extends XoopsObject
26 26
 //class extcal_etablissement extends XoopsObject
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $title = $this->isNew() ? sprintf(_MD_EXTCAL_ETABLISSEMENT_ADD) : sprintf(_MD_EXTCAL_ETABLISSEMENT_EDIT);
72 72
 
73
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
73
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
74 74
 
75 75
         $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
76 76
         $form->setExtra('enctype="multipart/form-data"');
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_HORAIRES, 'horaires', $this->getVar('horaires'), 3, 40));
90 90
         $form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_DIVERS, 'divers', $this->getVar('divers'), 5, 40));
91 91
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_TARIFS, 'tarifs', $this->getVar("tarifs"), 5, 40));
92
-        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS . ' ( ' . _MD_EXTCAL_DEVISE2 . ' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
92
+        $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_TARIFS.' ( '._MD_EXTCAL_DEVISE2.' )', 'tarifs', 20, 20, $this->getVar('tarifs')), false);
93 93
 
94 94
         //$form->addElement(new XoopsFormTextArea(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', $this->getVar("map"), 5, 40));
95 95
         $form->addElement(new XoopsFormText(_MD_EXTCAL_ETABLISSEMENT_MAP, 'map', 150, 255, $this->getVar('map')), false);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         //Logo
98 98
         $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), '');
99 99
         if ($this->getVar('logo') != '') {
100
-            $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/etablissement/' . $this->getVar('logo') . "' name='image' id='image' alt=''><br><br>"));
100
+            $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/etablissement/'.$this->getVar('logo')."' name='image' id='image' alt=''><br><br>"));
101 101
             $check_del_img = new XoopsFormCheckBox('', 'delimg');
102 102
             $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG);
103 103
             $file_tray->addElement($check_del_img);
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
         }
109 109
         $file_img->setExtra("size ='40'");
110 110
         $file_tray->addElement($file_img);
111
-        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(3145728 / 1000), 500, 500);
112
-        $file_label = new XoopsFormLabel('', '<br>' . $msg);
111
+        $msg        = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (3145728 / 1000), 500, 500);
112
+        $file_label = new XoopsFormLabel('', '<br>'.$msg);
113 113
         $file_tray->addElement($file_label);
114 114
         $form->addElement($file_tray);
115 115
         $form->addElement(new XoopsFormHidden('file', $this->getVar('logo')));
Please login to merge, or discard this patch.