Completed
Branch master (838035)
by Michael
03:45
created
htdocs/class/xoopsform/spin/formspin.php 4 patches
Doc Comments   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     /**
189 189
      * Set the value
190 190
      *
191
-     * @param  $value int
191
+     * @param  integer $value int
192 192
      */
193 193
     function setValue($value)
194 194
     {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * Set the min value
209 209
      *
210
-     * @param  $min int
210
+     * @param  integer $min int
211 211
      */
212 212
     function setMin($min)
213 213
     {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     /**
226 226
      * Set the max value - must be more great then min
227 227
      *
228
-     * @param  $max int
228
+     * @param  integer $max int
229 229
      */
230 230
     function setMax($max)
231 231
     {
@@ -246,6 +246,7 @@  discard block
 block discarded – undo
246 246
      * must be  " > 0 "
247 247
      *
248 248
      * @param  $value int
249
+     * @param integer $smallIncrement
249 250
      */
250 251
     function setSmallIncrement($smallIncrement)
251 252
     {
@@ -265,7 +266,7 @@  discard block
 block discarded – undo
265 266
     /**
266 267
      * Set the large increment when click a long time on up down nutton
267 268
      *
268
-     * @param  $largeIncrement int
269
+     * @param  integer $largeIncrement int
269 270
      */
270 271
     function setLargeIncrement($largeIncrement)
271 272
     {
@@ -286,7 +287,7 @@  discard block
 block discarded – undo
286 287
      * Set the size in nb car of the input text for the value
287 288
      * must be 2 car min
288 289
      *
289
-     * @param  $size mixed
290
+     * @param  integer $size mixed
290 291
      */
291 292
     function setSize($size)
292 293
     {
@@ -305,7 +306,7 @@  discard block
 block discarded – undo
305 306
     /**
306 307
      * Set the shortname of the folder images
307 308
      *
308
-     * @param  $folder string
309
+     * @param  string $folder string
309 310
      */
310 311
     function setImgFolder($folder)
311 312
     {
@@ -323,7 +324,7 @@  discard block
 block discarded – undo
323 324
     /**
324 325
      * Set the label of unites between value and buttons
325 326
      *
326
-     * @param  $unite string
327
+     * @param  string $unite string
327 328
      */
328 329
     function setUnite($unite)
329 330
     {
@@ -341,7 +342,7 @@  discard block
 block discarded – undo
341 342
     /**
342 343
      * Set the style CSS of the text
343 344
      *
344
-     * @param  $style string
345
+     * @param  string $style string
345 346
      */
346 347
     function setStyleText($style)
347 348
     {
@@ -359,7 +360,7 @@  discard block
 block discarded – undo
359 360
     /**
360 361
      * Set the style CSS of the frame
361 362
      *
362
-     * @param  $style string
363
+     * @param  string $style string
363 364
      */
364 365
     function setStyleBordure($style)
365 366
     {
@@ -377,7 +378,7 @@  discard block
 block discarded – undo
377 378
     /**
378 379
      * Set  MinMaxVisible : show the button to go min and max value
379 380
      *
380
-     * @param  $visible bool
381
+     * @param  boolean $visible bool
381 382
      */
382 383
     function setMinMaxVisible($visible)
383 384
     {
@@ -485,6 +486,10 @@  discard block
 block discarded – undo
485 486
 /********************************************************************
486 487
  *
487 488
 *********************************************************************/
489
+/**
490
+ * @param string $attribut
491
+ * @param string $value
492
+ */
488 493
 function htmlAddAttribut($attribut, $value, $default = ''){
489 494
 
490 495
   if ($value == ''){$value = $default;}
Please login to merge, or discard this patch.
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
      *
156 156
      */
157 157
     function XoopsFormSpin($caption, $name, $value = 0,
158
-                           $min = 0, $max=100,
159
-                           $smallIncrement = 1, $largeIncrement = 10,
160
-                           $size = 5, $unite='', $imgFolder='default',
161
-                           $styleText = '', $styleBordure = '',
162
-                           $minMaxVisible = true)
158
+                            $min = 0, $max=100,
159
+                            $smallIncrement = 1, $largeIncrement = 10,
160
+                            $size = 5, $unite='', $imgFolder='default',
161
+                            $styleText = '', $styleBordure = '',
162
+                            $minMaxVisible = true)
163 163
     {
164 164
         $this->setName($name);
165 165
         $this->setCaption($caption);
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     function setValue($value)
194 194
     {
195
-         $this->_value = $value;
195
+            $this->_value = $value;
196 196
     }
197 197
 
198 198
     /*-----------------------------------------------------------------*/
@@ -392,83 +392,83 @@  discard block
 block discarded – undo
392 392
      */
393 393
     function render()
394 394
     {
395
-     $sSpinFolder = $this->getFolder();
396
-     $sFolderImg =  "{$sSpinFolder}/images/{$this->getImgFolder()}/";
395
+        $sSpinFolder = $this->getFolder();
396
+        $sFolderImg =  "{$sSpinFolder}/images/{$this->getImgFolder()}/";
397 397
 
398 398
   
399
-      $prefixe = $this->getName();
400
-      $prefixe2 = 'spin'.$prefixe;
399
+        $prefixe = $this->getName();
400
+        $prefixe2 = 'spin'.$prefixe;
401 401
     
402
-      $smallIncrement = $this->getSmallIncrement();
403
-      $largeIncrement = $this->getLargeIncrement();
402
+        $smallIncrement = $this->getSmallIncrement();
403
+        $largeIncrement = $this->getLargeIncrement();
404 404
     
405
-      /*----------------------------------------------*/
406
-      $delai = 200;
407
-      $onMouseDown1 = "spinStart(\"{$prefixe}\", \"{$prefixe2}\",  {$smallIncrement},  {$largeIncrement}, {$delai}, \"{$sFolderImg}spinUp1.gif\");";
408
-      $onMouseDown2 = "spinStart(\"{$prefixe}\", \"{$prefixe2}\", -{$smallIncrement}, -{$largeIncrement}, {$delai}, \"{$sFolderImg}spinDown1.gif\");";
409
-
410
-      $onMouseUp = "spinStop();";
411
-      //----------------------------------------------------------------
412
-      $styleBordure = $this->htmlAddAttribut ('style', $this->getStyleBordure());
413
-      $styleText    = $this->htmlAddAttribut ('style', $this->getStyleText());
414
-      $styleArrow = "style=\"display: table-cell;vertical-align: middle; text-align: center; line-height: 100%; font-size: 7 pt; margin-top: 0; margin-bottom: 0; padding: 0\"";
415
-      //----------------------------------------------------------------
416
-      $t = array();
405
+        /*----------------------------------------------*/
406
+        $delai = 200;
407
+        $onMouseDown1 = "spinStart(\"{$prefixe}\", \"{$prefixe2}\",  {$smallIncrement},  {$largeIncrement}, {$delai}, \"{$sFolderImg}spinUp1.gif\");";
408
+        $onMouseDown2 = "spinStart(\"{$prefixe}\", \"{$prefixe2}\", -{$smallIncrement}, -{$largeIncrement}, {$delai}, \"{$sFolderImg}spinDown1.gif\");";
409
+
410
+        $onMouseUp = "spinStop();";
411
+        //----------------------------------------------------------------
412
+        $styleBordure = $this->htmlAddAttribut ('style', $this->getStyleBordure());
413
+        $styleText    = $this->htmlAddAttribut ('style', $this->getStyleText());
414
+        $styleArrow = "style=\"display: table-cell;vertical-align: middle; text-align: center; line-height: 100%; font-size: 7 pt; margin-top: 0; margin-bottom: 0; padding: 0\"";
415
+        //----------------------------------------------------------------
416
+        $t = array();
417 417
 
418 418
       
419
-      if ($this->_loadJS) {
419
+        if ($this->_loadJS) {
420 420
         $js = $sSpinFolder . "/js/spin.js";
421 421
         $t[] = "<script src='{$js}' type='text/javascript'></script>";
422
-      }
422
+        }
423 423
       
424
-      $t[] = "<div STYLE='width:50px'>";
425
-      //$t[] = "<table border='0' width='8%' cellpadding='0' cellspacing='0'>";
426
-      $t[] = "<table border='0' width='8%' cellpadding='0' cellspacing='0' {$styleBordure}>";
427
-      $t[] = "  <tr>";
428
-      //$t[] = "    <td width='60%'>{$Caption}</td>";
429
-      $t[] = "    <td width='60%'>";
430
-      $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_min' VALUE='{$this->getMin()}'>";
431
-      $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_max' VALUE='{$this->getMax()}'>";
432
-      $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_smallIncrement' VALUE='{$this->_smallIncrement}'  style='text-align: right'>";
433
-      $t[] = "      <input type='text'  name='{$prefixe}' size='{$this->GetSize()}' value='{$this->getValue()}' {$styleText}>";
434
-      $t[] = "    </td>";
424
+        $t[] = "<div STYLE='width:50px'>";
425
+        //$t[] = "<table border='0' width='8%' cellpadding='0' cellspacing='0'>";
426
+        $t[] = "<table border='0' width='8%' cellpadding='0' cellspacing='0' {$styleBordure}>";
427
+        $t[] = "  <tr>";
428
+        //$t[] = "    <td width='60%'>{$Caption}</td>";
429
+        $t[] = "    <td width='60%'>";
430
+        $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_min' VALUE='{$this->getMin()}'>";
431
+        $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_max' VALUE='{$this->getMax()}'>";
432
+        $t[] = "    	<INPUT TYPE='hidden' NAME='{$prefixe2}_smallIncrement' VALUE='{$this->_smallIncrement}'  style='text-align: right'>";
433
+        $t[] = "      <input type='text'  name='{$prefixe}' size='{$this->GetSize()}' value='{$this->getValue()}' {$styleText}>";
434
+        $t[] = "    </td>";
435 435
       
436
-      $unite = $this->getUnite();
437
-      if ($unite <> ''){
436
+        $unite = $this->getUnite();
437
+        if ($unite <> ''){
438 438
         $t[] = "    <td style='display: table-cell;vertical-align: middle; '>&nbsp;{$unite}&nbsp;</td>";
439
-      }
440
-      //-------------------------------------------------------
441
-      if ($this->getMinMaxVisible()){
439
+        }
440
+        //-------------------------------------------------------
441
+        if ($this->getMinMaxVisible()){
442 442
         $onMouseDownMin = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Min\", {$this->getMin()}, {$delai}, \"{$sFolderImg}spinMin1.gif\");";
443 443
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
444 444
         $t[] = "      <img border='0' name='{$prefixe2}_imgMin' src='{$sFolderImg}spinMin0.gif'   onmousedown='{$onMouseDownMin}'><br>";
445 445
         $t[] = "    </td>";
446
-      }
447
-      //-------------------------------------------------------
448
-      $t[] = "    <td width='63%' align='center' {$styleArrow}>";
446
+        }
447
+        //-------------------------------------------------------
448
+        $t[] = "    <td width='63%' align='center' {$styleArrow}>";
449 449
     
450
-      $t[] = "      <img border='0' name='{$prefixe2}_img0' src='{$sFolderImg}spinUp0.gif'   onmousedown='{$onMouseDown1}' onmouseup='{$onMouseUp}' onmouseout='{$onMouseUp}'><br>";
451
-      $t[] = "      <img border='0' name='{$prefixe2}_img1' src='{$sFolderImg}spinDown0.gif' onmousedown='{$onMouseDown2}' onmouseup='{$onMouseUp}' onmouseout='{$onMouseUp}'>";
450
+        $t[] = "      <img border='0' name='{$prefixe2}_img0' src='{$sFolderImg}spinUp0.gif'   onmousedown='{$onMouseDown1}' onmouseup='{$onMouseUp}' onmouseout='{$onMouseUp}'><br>";
451
+        $t[] = "      <img border='0' name='{$prefixe2}_img1' src='{$sFolderImg}spinDown0.gif' onmousedown='{$onMouseDown2}' onmouseup='{$onMouseUp}' onmouseout='{$onMouseUp}'>";
452 452
     
453
-      $t[] = "    </td>";
453
+        $t[] = "    </td>";
454 454
       
455
-      //-------------------------------------------------------
456
-      if ($this->getMinMaxVisible()){
455
+        //-------------------------------------------------------
456
+        if ($this->getMinMaxVisible()){
457 457
         $onMouseDownMax = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Max\", {$this->getMax()}, {$delai}, \"{$sFolderImg}spinMax1.gif\");";
458 458
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
459 459
         $t[] = "      <img border='0' name='{$prefixe2}_imgMax' src='{$sFolderImg}spinMax0.gif'   onmousedown='{$onMouseDownMax}'><br>";
460 460
         $t[] = "    </td>";
461
-      }
462
-      //-------------------------------------------------------
461
+        }
462
+        //-------------------------------------------------------
463 463
       
464 464
       
465
-      $t[] = "  </tr>";
466
-      $t[] = "</table>"."\n";
467
-      $t[] = "</div>";
468
-      //-------------------------------------------
469
-      $html = implode ("\n", $t);
465
+        $t[] = "  </tr>";
466
+        $t[] = "</table>"."\n";
467
+        $t[] = "</div>";
468
+        //-------------------------------------------
469
+        $html = implode ("\n", $t);
470 470
 
471
-      return $html;
471
+        return $html;
472 472
 
473 473
 }
474 474
 
@@ -487,17 +487,17 @@  discard block
 block discarded – undo
487 487
 *********************************************************************/
488 488
 function htmlAddAttribut($attribut, $value, $default = ''){
489 489
 
490
-  if ($value == ''){$value = $default;}
490
+    if ($value == ''){$value = $default;}
491 491
   
492
-  if ($value <> ""){
492
+    if ($value <> ""){
493 493
     if (substr($value,0,strlen($attribut)) <> $attribut){
494
-      $r ="{$attribut}=\"{$value}\"";
494
+        $r ="{$attribut}=\"{$value}\"";
495 495
     }
496
-  }else{
496
+    }else{
497 497
     $r = '';
498
-  }
498
+    }
499 499
   
500
-  return $r;
500
+    return $r;
501 501
 
502 502
 }
503 503
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 /*----------------------------------------------------------*/
34 34
 /* set here the folder of the clas relative at the root     */
35 35
 /*----------------------------------------------------------*/
36
-define('_SPIN_FOLDER','/class/xoopsform/spin/');
36
+define('_SPIN_FOLDER', '/class/xoopsform/spin/');
37 37
 /*----------------------------------------------------------*/
38 38
 
39 39
 class XoopsFormSpin extends XoopsFormElement
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @var integer
110 110
      * @access private
111 111
      */
112
-    var $_minMaxVisible= true;
112
+    var $_minMaxVisible = true;
113 113
 
114 114
     /**
115 115
      *  tyleBordure ;  style CSS of frame control
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
      *
156 156
      */
157 157
     function XoopsFormSpin($caption, $name, $value = 0,
158
-                           $min = 0, $max=100,
158
+                           $min = 0, $max = 100,
159 159
                            $smallIncrement = 1, $largeIncrement = 10,
160
-                           $size = 5, $unite='', $imgFolder='default',
160
+                           $size = 5, $unite = '', $imgFolder = 'default',
161 161
                            $styleText = '', $styleBordure = '',
162 162
                            $minMaxVisible = true)
163 163
     {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     function setSmallIncrement($smallIncrement)
251 251
     {
252 252
         $this->_smallIncrement = intval($smallIncrement);
253
-        if ($this->_smallIncrement == 0) $this->_smallIncrement =1;
253
+        if ($this->_smallIncrement == 0) $this->_smallIncrement = 1;
254 254
     }
255 255
     
256 256
     /*-----------------------------------------------------------------*/
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     function setImgFolder($folder)
311 311
     {
312
-        if ($folder <> '' ) $this->_imgFolder = $folder;
312
+        if ($folder <> '') $this->_imgFolder = $folder;
313 313
     }
314 314
     /*-----------------------------------------------------------------*/
315 315
     /**
@@ -393,11 +393,11 @@  discard block
 block discarded – undo
393 393
     function render()
394 394
     {
395 395
      $sSpinFolder = $this->getFolder();
396
-     $sFolderImg =  "{$sSpinFolder}/images/{$this->getImgFolder()}/";
396
+     $sFolderImg = "{$sSpinFolder}/images/{$this->getImgFolder()}/";
397 397
 
398 398
   
399 399
       $prefixe = $this->getName();
400
-      $prefixe2 = 'spin'.$prefixe;
400
+      $prefixe2 = 'spin' . $prefixe;
401 401
     
402 402
       $smallIncrement = $this->getSmallIncrement();
403 403
       $largeIncrement = $this->getLargeIncrement();
@@ -409,8 +409,8 @@  discard block
 block discarded – undo
409 409
 
410 410
       $onMouseUp = "spinStop();";
411 411
       //----------------------------------------------------------------
412
-      $styleBordure = $this->htmlAddAttribut ('style', $this->getStyleBordure());
413
-      $styleText    = $this->htmlAddAttribut ('style', $this->getStyleText());
412
+      $styleBordure = $this->htmlAddAttribut('style', $this->getStyleBordure());
413
+      $styleText    = $this->htmlAddAttribut('style', $this->getStyleText());
414 414
       $styleArrow = "style=\"display: table-cell;vertical-align: middle; text-align: center; line-height: 100%; font-size: 7 pt; margin-top: 0; margin-bottom: 0; padding: 0\"";
415 415
       //----------------------------------------------------------------
416 416
       $t = array();
@@ -434,11 +434,11 @@  discard block
 block discarded – undo
434 434
       $t[] = "    </td>";
435 435
       
436 436
       $unite = $this->getUnite();
437
-      if ($unite <> ''){
437
+      if ($unite <> '') {
438 438
         $t[] = "    <td style='display: table-cell;vertical-align: middle; '>&nbsp;{$unite}&nbsp;</td>";
439 439
       }
440 440
       //-------------------------------------------------------
441
-      if ($this->getMinMaxVisible()){
441
+      if ($this->getMinMaxVisible()) {
442 442
         $onMouseDownMin = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Min\", {$this->getMin()}, {$delai}, \"{$sFolderImg}spinMin1.gif\");";
443 443
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
444 444
         $t[] = "      <img border='0' name='{$prefixe2}_imgMin' src='{$sFolderImg}spinMin0.gif'   onmousedown='{$onMouseDownMin}'><br>";
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
       $t[] = "    </td>";
454 454
       
455 455
       //-------------------------------------------------------
456
-      if ($this->getMinMaxVisible()){
456
+      if ($this->getMinMaxVisible()) {
457 457
         $onMouseDownMax = "spinSetValue(\"{$prefixe}\", \"{$prefixe2}\",  \"Max\", {$this->getMax()}, {$delai}, \"{$sFolderImg}spinMax1.gif\");";
458 458
         $t[] = "    <td width='63%' align='center' {$styleArrow}>";
459 459
         $t[] = "      <img border='0' name='{$prefixe2}_imgMax' src='{$sFolderImg}spinMax0.gif'   onmousedown='{$onMouseDownMax}'><br>";
@@ -463,10 +463,10 @@  discard block
 block discarded – undo
463 463
       
464 464
       
465 465
       $t[] = "  </tr>";
466
-      $t[] = "</table>"."\n";
466
+      $t[] = "</table>" . "\n";
467 467
       $t[] = "</div>";
468 468
       //-------------------------------------------
469
-      $html = implode ("\n", $t);
469
+      $html = implode("\n", $t);
470 470
 
471 471
       return $html;
472 472
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 /**************************************************************************
476 476
  * calcul du dossier du composant
477 477
  *************************************************************************/
478
-function getFolder (){
478
+function getFolder() {
479 479
 
480 480
     $sSpinFolder = XOOPS_URL . _SPIN_FOLDER;
481 481
 
@@ -485,15 +485,15 @@  discard block
 block discarded – undo
485 485
 /********************************************************************
486 486
  *
487 487
 *********************************************************************/
488
-function htmlAddAttribut($attribut, $value, $default = ''){
488
+function htmlAddAttribut($attribut, $value, $default = '') {
489 489
 
490
-  if ($value == ''){$value = $default;}
490
+  if ($value == '') {$value = $default; }
491 491
   
492
-  if ($value <> ""){
493
-    if (substr($value,0,strlen($attribut)) <> $attribut){
494
-      $r ="{$attribut}=\"{$value}\"";
492
+  if ($value <> "") {
493
+    if (substr($value, 0, strlen($attribut)) <> $attribut) {
494
+      $r = "{$attribut}=\"{$value}\"";
495 495
     }
496
-  }else{
496
+  } else {
497 497
     $r = '';
498 498
   }
499 499
   
Please login to merge, or discard this patch.
Braces   +19 added lines, -7 removed lines patch added patch discarded remove patch
@@ -250,7 +250,9 @@  discard block
 block discarded – undo
250 250
     function setSmallIncrement($smallIncrement)
251 251
     {
252 252
         $this->_smallIncrement = intval($smallIncrement);
253
-        if ($this->_smallIncrement == 0) $this->_smallIncrement =1;
253
+        if ($this->_smallIncrement == 0) {
254
+            $this->_smallIncrement =1;
255
+        }
254 256
     }
255 257
     
256 258
     /*-----------------------------------------------------------------*/
@@ -270,7 +272,9 @@  discard block
 block discarded – undo
270 272
     function setLargeIncrement($largeIncrement)
271 273
     {
272 274
         $this->_largeIncrement = intval($largeIncrement);
273
-        if ($this->_largeIncrement == 0) $this->_largeIncrement = 10;
275
+        if ($this->_largeIncrement == 0) {
276
+            $this->_largeIncrement = 10;
277
+        }
274 278
     }
275 279
     
276 280
     /*-----------------------------------------------------------------*/
@@ -291,7 +295,9 @@  discard block
 block discarded – undo
291 295
     function setSize($size)
292 296
     {
293 297
         $this->_size = $size;
294
-        if ($this->_size == 0) $this->_size = 2;
298
+        if ($this->_size == 0) {
299
+            $this->_size = 2;
300
+        }
295 301
     }
296 302
     /*-----------------------------------------------------------------*/
297 303
     function getImgFolder()
@@ -309,7 +315,9 @@  discard block
 block discarded – undo
309 315
      */
310 316
     function setImgFolder($folder)
311 317
     {
312
-        if ($folder <> '' ) $this->_imgFolder = $folder;
318
+        if ($folder <> '' ) {
319
+            $this->_imgFolder = $folder;
320
+        }
313 321
     }
314 322
     /*-----------------------------------------------------------------*/
315 323
     /**
@@ -345,7 +353,9 @@  discard block
 block discarded – undo
345 353
      */
346 354
     function setStyleText($style)
347 355
     {
348
-        if ($style <> '') $this->_styleText = $style;
356
+        if ($style <> '') {
357
+            $this->_styleText = $style;
358
+        }
349 359
     }
350 360
     /*-----------------------------------------------------------------*/
351 361
     /**
@@ -363,7 +373,9 @@  discard block
 block discarded – undo
363 373
      */
364 374
     function setStyleBordure($style)
365 375
     {
366
-        if ($style <> '') $this->_styleBordure = $style;
376
+        if ($style <> '') {
377
+            $this->_styleBordure = $style;
378
+        }
367 379
     }
368 380
     /*-----------------------------------------------------------------*/
369 381
     /**
@@ -493,7 +505,7 @@  discard block
 block discarded – undo
493 505
     if (substr($value,0,strlen($attribut)) <> $attribut){
494 506
       $r ="{$attribut}=\"{$value}\"";
495 507
     }
496
-  }else{
508
+  } else{
497 509
     $r = '';
498 510
   }
499 511
   
Please login to merge, or discard this patch.
htdocs/modules/extcal/blocks/minical.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -450,9 +450,9 @@
 block discarded – undo
450 450
 /**
451 451
  * @param $event
452 452
  * @param $eventsArray
453
- * @param $extcalTimeHandler
454
- * @param $startMonth
455
- * @param $endMonth
453
+ * @param ExtcalTime $extcalTimeHandler
454
+ * @param integer $startMonth
455
+ * @param integer $endMonth
456 456
  * @param $cats
457 457
  */
458 458
 function bExtcalMinicalAddEventToArray(
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     // Retriving Image for block if enabled
27 27
     if ($options[0] == 1) {
28
-        $imageHandler =& xoops_gethandler('image');
28
+        $imageHandler = & xoops_gethandler('image');
29 29
         $criteria     = new Criteria('imgcat_id', $options[1]);
30 30
         $criteria->setSort('RAND()');
31 31
         $criteria->setLimit($options[6]);
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
     //$xoopsModuleConfig = $extcalConfig->getModuleConfig();
55 55
 //----------------------------------------------------
56 56
 //recupe de xoopsmoduleConfig
57
-    $module_handler =& xoops_gethandler('module');
58
-    $module         =& $module_handler->getByDirname('extcal');
59
-    $config_handler =& xoops_gethandler('config');
57
+    $module_handler = & xoops_gethandler('module');
58
+    $module         = & $module_handler->getByDirname('extcal');
59
+    $config_handler = & xoops_gethandler('config');
60 60
     if ($module) {
61
-        $extcalConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
61
+        $extcalConfig = & $config_handler->getConfigsByCat(0, $module->getVar('mid'));
62 62
     }
63 63
 //----------------------------------------------------
64 64
     // Getting eXtCal object's handler
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'cat'          => $tCatSelected,
107 107
             'externalKeys' => 'cat_id'
108 108
         );
109
-        $events   = $eventHandler->getEventsOnPeriode($criteres);
109
+        $events = $eventHandler->getEventsOnPeriode($criteres);
110 110
     } else {
111 111
         $events = array();
112 112
     }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
     $catHandler      = xoops_getmodulehandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
255 255
     $cats            = $catHandler->getAllCat($xoopsUser, 'extcal_cat_view');
256
-    $imageCatHandler =& xoops_gethandler('imagecategory');
256
+    $imageCatHandler = & xoops_gethandler('imagecategory');
257 257
 
258 258
     //=====================================================================
259 259
     $form->insertBreak('<center><b>' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</b></center>', 'head');
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
 include_once(XOOPS_ROOT_PATH . '/modules/extcal/class/tableForm.php');
6 6
 //---------------------------------------------------------------------------
7 7
 /**
8
- * @param $options
9
- *
10
- * @return array
11
- */
8
+     * @param $options
9
+     *
10
+     * @return array
11
+     */
12 12
 function bExtcalMinicalShow($options)
13 13
 {
14 14
     global $extcalConfig, $xoopsUser;
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/colorTools.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -264,6 +264,10 @@
 block discarded – undo
264 264
      * @param $max
265 265
      * @return
266 266
 */
267
+
268
+    /**
269
+     * @param integer $min
270
+     */
267 271
     Function bornerValeur($val, $min, $max)
268 272
     {
269 273
 
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/event.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
     /**
792 792
      * @param $start
793 793
      * @param $end
794
-     * @param $cat
794
+     * @param integer $cat
795 795
      * @param $user
796 796
      *
797 797
      * @return CriteriaCompo
@@ -1841,7 +1841,7 @@  discard block
 block discarded – undo
1841 1841
 
1842 1842
     /**
1843 1843
      * @param $month
1844
-     * @param $year
1844
+     * @param string $year
1845 1845
      * @param $dayCode
1846 1846
      *
1847 1847
      * @return int
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
 
1727 1727
                 $eventHourOccurStart = $event['event_recur_start'] - mktime(0, 0, 0, $month, $day, $year);
1728 1728
                 $eventHourOccurEnd
1729
-                                     = $event['event_end'] - $event['event_start'];
1729
+                                        = $event['event_end'] - $event['event_start'];
1730 1730
 
1731 1731
                 // Parse all occurence of this event
1732 1732
                 while ($nbOccur < $rRuleInterval) {
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
                     }
1737 1737
 
1738 1738
                     $occurEventStart
1739
-                                   = $eventDayOccurStart + $eventHourOccurStart;
1739
+                                    = $eventDayOccurStart + $eventHourOccurStart;
1740 1740
                     $occurEventEnd = $occurEventStart + $eventHourOccurEnd;
1741 1741
 
1742 1742
                     if // Event start falls within search period
@@ -1786,7 +1786,7 @@  discard block
 block discarded – undo
1786 1786
 
1787 1787
                 $eventHourOccurStart = $event['event_recur_start'] - mktime(0, 0, 0, $month, $day, $year);
1788 1788
                 $eventHourOccurEnd
1789
-                                     = $event['event_end'] - $event['event_start'];
1789
+                                        = $event['event_end'] - $event['event_start'];
1790 1790
 
1791 1791
                 // If recurring month not specified, make it starting month
1792 1792
                 if (!count($eventOptions)) {
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
                     }
1803 1803
 
1804 1804
                     $occurEventStart
1805
-                                   = $eventDayOccurStart + $eventHourOccurStart;
1805
+                                    = $eventDayOccurStart + $eventHourOccurStart;
1806 1806
                     $occurEventEnd = $eventDayOccurStart + $eventHourOccurEnd;
1807 1807
 
1808 1808
                     if // Event start falls within search period
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false);
51 51
         $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false);
52 52
 
53
-        $this->externalKey['cat_id']          = array(
53
+        $this->externalKey['cat_id'] = array(
54 54
             'className'      => 'cat',
55 55
             'getMethodeName' => 'getCat',
56 56
             'keyName'        => 'cat',
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
     {
385 385
         //ext_echoArray($criteres);
386 386
         global $extcalConfig;
387
-        $myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
387
+        $myts = & MyTextSanitizer::getInstance(); // MyTextSanitizer object
388 388
 
389 389
         $eventsU = $this->getEventsUniques($criteres);
390 390
         $eventsR = $this->getEventsRecurents($criteres);
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
                         $year
571 571
                     ),
572 572
                     $this->_extcalTime->_getUserTimeZone($user)
573
-                );;
573
+                ); ;
574 574
                 //$criteriaCompo->add(new Criteria('event_start', $end, '<='));
575 575
 
576 576
                 break;
@@ -2562,7 +2562,7 @@  discard block
 block discarded – undo
2562 2562
                 'te.event_address',
2563 2563
                 'tc.cat_name'
2564 2564
             );
2565
-            $t       = array();
2565
+            $t = array();
2566 2566
             for (
2567 2567
                 $i = 0, $count = count($queryarray); $i < $count; ++$i
2568 2568
             ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1691,9 +1691,11 @@
 block discarded – undo
1691 1691
                     if ($occurEventStart <= $periodEnd // Event start falls within search period
1692 1692
                         && $occurEventEnd >= $periodStart // Event end falls within search period
1693 1693
                         && in_array($dayArray[date('w', $occurEventStart)], $eventOptions)
1694
-                    ) // This week day is selected
1694
+                    ) {
1695
+                        // This week day is selected
1695 1696
                     {
1696 1697
                         $event['event_start'] = $occurEventStart;
1698
+                    }
1697 1699
                         $event['event_end']   = $occurEventEnd;
1698 1700
 
1699 1701
                         $recuEvents[] = $event;
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/ExtcalPersistableObjectHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -536,7 +536,7 @@
 block discarded – undo
536 536
 
537 537
     /**
538 538
      * @param        $objects
539
-     * @param array  $externalKeys
539
+     * @param string[]  $externalKeys
540 540
      * @param string $format
541 541
      *
542 542
      * @return array
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $ret = array();
158 158
         while ($myrow = $this->db->fetchArray($result)) {
159
-            $obj =& $this->create(false);
159
+            $obj = & $this->create(false);
160 160
             $obj->assignVars($myrow);
161 161
             if (!$idAsKey) {
162 162
                 if ($asObject) {
163
-                    $ret[] =& $obj;
163
+                    $ret[] = & $obj;
164 164
                 } else {
165 165
                     $row  = array();
166 166
                     $vars = $obj->getVars();
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 }
174 174
             } else {
175 175
                 if ($asObject) {
176
-                    $ret[$myrow[$this->keyName]] =& $obj;
176
+                    $ret[$myrow[$this->keyName]] = & $obj;
177 177
                 } else {
178 178
                     $row  = array();
179 179
                     $vars = $obj->getVars();
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             return $ret;
230 230
         }
231 231
 
232
-        $myts =& MyTextSanitizer::getInstance();
232
+        $myts = & MyTextSanitizer::getInstance();
233 233
         while ($myrow = $this->db->fetchArray($result)) {
234 234
             //identifiers should be textboxes, so sanitize them like that
235 235
             $ret[$myrow[$this->keyName]] = empty($this->identifierName) ? 1 : $myts->htmlSpecialChars($myrow[$this->identifierName]);
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/form/formdatetime.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
 
11 11
     /**
12
-     * @param     $form
12
+     * @param     ExtcalThemeForm $form
13 13
      * @param int $startTS
14 14
      * @param int $endTS
15 15
      */
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/form/formfilecheckbox.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 {
8 8
 
9 9
     /**
10
-     * @param      $caption
11
-     * @param      $name
10
+     * @param      string $caption
11
+     * @param      string $name
12 12
      * @param null $value
13 13
      */
14 14
     function ExtcalFormFileCheckBox($caption, $name, $value = null)
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/form/formrrulecheckbox.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 {
8 8
 
9 9
     /**
10
-     * @param      $caption
11
-     * @param      $name
12
-     * @param null $value
10
+     * @param      string $caption
11
+     * @param      string $name
12
+     * @param string $value
13 13
      */
14 14
     function ExtcalFormRRuleCheckBox($caption, $name, $value = null)
15 15
     {
Please login to merge, or discard this patch.
htdocs/modules/extcal/class/pcltar.lib.php 1 patch
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
     /**
1191 1191
      * @param        $p_tarname
1192 1192
      * @param        $p_list
1193
-     * @param        $p_mode
1193
+     * @param        string $p_mode
1194 1194
      * @param string $p_add_dir
1195 1195
      * @param string $p_remove_dir
1196 1196
      *
@@ -1290,10 +1290,10 @@  discard block
 block discarded – undo
1290 1290
     /**
1291 1291
      * @param $p_tarname
1292 1292
      * @param $p_list
1293
-     * @param $p_mode
1293
+     * @param string $p_mode
1294 1294
      * @param $p_list_detail
1295
-     * @param $p_add_dir
1296
-     * @param $p_remove_dir
1295
+     * @param string $p_add_dir
1296
+     * @param string $p_remove_dir
1297 1297
      *
1298 1298
      * @return int
1299 1299
      */
@@ -2092,10 +2092,10 @@  discard block
 block discarded – undo
2092 2092
      * @param $p_tarname
2093 2093
      * @param $p_file_list
2094 2094
      * @param $p_list_detail
2095
-     * @param $p_mode
2096
-     * @param $p_path
2095
+     * @param string $p_mode
2096
+     * @param string $p_path
2097 2097
      * @param $p_tar_mode
2098
-     * @param $p_remove_path
2098
+     * @param string $p_remove_path
2099 2099
      *
2100 2100
      * @return int
2101 2101
      */
@@ -2648,8 +2648,8 @@  discard block
 block discarded – undo
2648 2648
      * @param $p_tarname
2649 2649
      * @param $p_index_string
2650 2650
      * @param $p_list_detail
2651
-     * @param $p_path
2652
-     * @param $p_remove_path
2651
+     * @param string $p_path
2652
+     * @param string $p_remove_path
2653 2653
      * @param $p_tar_mode
2654 2654
      *
2655 2655
      * @return int
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
      * @param $p_tarname
3220 3220
      * @param $p_file_list
3221 3221
      * @param $p_list_detail
3222
-     * @param $p_tar_mode
3222
+     * @param string $p_tar_mode
3223 3223
      *
3224 3224
      * @return int
3225 3225
      */
@@ -3513,9 +3513,9 @@  discard block
 block discarded – undo
3513 3513
      * @param $p_tarname
3514 3514
      * @param $p_file_list
3515 3515
      * @param $p_list_detail
3516
-     * @param $p_tar_mode
3517
-     * @param $p_add_dir
3518
-     * @param $p_remove_dir
3516
+     * @param string $p_tar_mode
3517
+     * @param string $p_add_dir
3518
+     * @param string $p_remove_dir
3519 3519
      *
3520 3520
      * @return int
3521 3521
      */
@@ -3922,7 +3922,7 @@  discard block
 block discarded – undo
3922 3922
     // Return Values :
3923 3923
     // --------------------------------------------------------------------------------
3924 3924
     /**
3925
-     * @param $v_binary_data
3925
+     * @param string $v_binary_data
3926 3926
      * @param $v_header
3927 3927
      *
3928 3928
      * @return int
Please login to merge, or discard this patch.