Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/AOR_Charts/lib/pChart/class/pData.class.php 1 patch
Doc Comments   +24 added lines patch added patch discarded remove patch
@@ -106,6 +106,10 @@  discard block
 block discarded – undo
106 106
     }
107 107
 
108 108
    /* Strip VOID values */
109
+
110
+   /**
111
+    * @param string $Values
112
+    */
109 113
    function stripVOID($Values)
110 114
     { if (!is_array($Values)) { return(array()); } $Result = array(); foreach($Values as $Key => $Value) { if ( $Value != VOID ) { $Result[] = $Value; } } return($Result); }
111 115
 
@@ -188,6 +192,10 @@  discard block
 block discarded – undo
188 192
     { $this->Data["XAxisUnit"] = $Unit; }
189 193
 
190 194
    /* Set the serie that will be used as abscissa */
195
+
196
+   /**
197
+    * @param string $Serie
198
+    */
191 199
    function setAbscissa($Serie)
192 200
     { if (isset($this->Data["Series"][$Serie])) { $this->Data["Abscissa"] = $Serie; } }
193 201
 
@@ -525,6 +533,10 @@  discard block
 block discarded – undo
525 533
     }
526 534
 
527 535
    /* Load a palette file */
536
+
537
+   /**
538
+    * @param string $FileName
539
+    */
528 540
    function loadPalette($FileName,$Overwrite=FALSE)
529 541
     {
530 542
      if ( !file_exists($FileName) ) { return(-1); }
@@ -560,6 +572,10 @@  discard block
 block discarded – undo
560 572
     }
561 573
 
562 574
    /* Initialise a given scatter serie */
575
+
576
+   /**
577
+    * @param integer $ID
578
+    */
563 579
    function initScatterSerie($ID)
564 580
     {
565 581
      if ( isset($this->Data["ScatterSeries"][$ID]) ) { return(0); }
@@ -582,6 +598,10 @@  discard block
 block discarded – undo
582 598
     }
583 599
 
584 600
    /* Initialise a given serie */
601
+
602
+   /**
603
+    * @param string $Serie
604
+    */
585 605
    function initialise($Serie)
586 606
     {
587 607
      if ( isset($this->Data["Series"]) ) { $ID = count($this->Data["Series"]); } else { $ID = 0; }
@@ -782,6 +802,10 @@  discard block
 block discarded – undo
782 802
     { return("pData object."); }
783 803
 
784 804
    function left($value,$NbChar)	{ return substr($value,0,$NbChar); }  
805
+
806
+   /**
807
+    * @param integer $NbChar
808
+    */
785 809
    function right($value,$NbChar)	{ return substr($value,strlen($value)-$NbChar,$NbChar); }  
786 810
    function mid($value,$Depart,$NbChar)	{ return substr($value,$Depart-1,$NbChar); }  
787 811
   }
Please login to merge, or discard this patch.
modules/AOR_Charts/lib/pChart/class/pDraw.class.php 1 patch
Doc Comments   +44 added lines patch added patch discarded remove patch
@@ -124,6 +124,10 @@  discard block
 block discarded – undo
124 124
     }
125 125
 
126 126
    /* Draw a polygon */
127
+
128
+   /**
129
+    * @param string $Points
130
+    */
127 131
    function drawPolygon($Points,$Format="")
128 132
     {
129 133
      $R			= isset($Format["R"]) ? $Format["R"] : 0;
@@ -573,6 +577,10 @@  discard block
 block discarded – undo
573 577
     }
574 578
 
575 579
    /* Drawn a spline based on the bezier function */
580
+
581
+   /**
582
+    * @param string $Coordinates
583
+    */
576 584
    function drawSpline($Coordinates,$Format="")
577 585
     {
578 586
      $R		= isset($Format["R"]) ? $Format["R"] : 0;
@@ -1028,6 +1036,10 @@  discard block
 block discarded – undo
1028 1036
     }
1029 1037
 
1030 1038
    /* Draw a gradient within a defined area */
1039
+
1040
+   /**
1041
+    * @param integer $Direction
1042
+    */
1031 1043
    function drawGradientArea($X1,$Y1,$X2,$Y2,$Direction,$Format="")
1032 1044
     {
1033 1045
      $StartR	= isset($Format["StartR"]) ? $Format["StartR"] : 90;
@@ -1109,6 +1121,11 @@  discard block
 block discarded – undo
1109 1121
     }
1110 1122
 
1111 1123
    /* Draw an aliased pixel */
1124
+
1125
+   /**
1126
+    * @param double $X
1127
+    * @param double $Y
1128
+    */
1112 1129
    function drawAntialiasPixel($X,$Y,$Format="")
1113 1130
     {
1114 1131
      $R     = isset($Format["R"]) ? $Format["R"] : 0;
@@ -1188,6 +1205,10 @@  discard block
 block discarded – undo
1188 1205
     }
1189 1206
 
1190 1207
    /* Convert apha to base 10 */
1208
+
1209
+   /**
1210
+    * @param integer $AlphaValue
1211
+    */
1191 1212
    function convertAlpha($AlphaValue)
1192 1213
     { return((127/100)*(100-$AlphaValue)); }
1193 1214
 
@@ -1205,6 +1226,11 @@  discard block
 block discarded – undo
1205 1226
     }
1206 1227
 
1207 1228
    /* Load a PNG file and draw it over the chart */
1229
+
1230
+   /**
1231
+    * @param double $X
1232
+    * @param double $Y
1233
+    */
1208 1234
    function drawFromPNG($X,$Y,$FileName)
1209 1235
     { $this->drawFromPicture(1,$FileName,$X,$Y); }
1210 1236
 
@@ -2484,6 +2510,9 @@  discard block
 block discarded – undo
2484 2510
       }
2485 2511
     }
2486 2512
 
2513
+   /**
2514
+    * @param integer $ID
2515
+    */
2487 2516
    function isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip)
2488 2517
     {
2489 2518
      if ( $LabelingMethod == LABELING_DIFFERENT && $Value != $LastValue ) { return(TRUE); }
@@ -2495,6 +2524,10 @@  discard block
 block discarded – undo
2495 2524
     }
2496 2525
 
2497 2526
    /* Compute the scale, check for the best visual factors */
2527
+
2528
+   /**
2529
+    * @param double $MaxDivs
2530
+    */
2498 2531
    function computeScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID=0)
2499 2532
     {
2500 2533
      /* Compute each factors */
@@ -2523,6 +2556,10 @@  discard block
 block discarded – undo
2523 2556
     }
2524 2557
 
2525 2558
    /* Compute the best matching scale based on size & factors */
2559
+
2560
+   /**
2561
+    * @param integer $AxisID
2562
+    */
2526 2563
    function processScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID)
2527 2564
     {
2528 2565
      $ScaleHeight = abs(ceil($XMax)-floor($XMin));
@@ -2603,6 +2640,9 @@  discard block
 block discarded – undo
2603 2640
      return($Scale);
2604 2641
     }
2605 2642
 
2643
+   /**
2644
+    * @param double $Value2
2645
+    */
2606 2646
    function modulo($Value1,$Value2)
2607 2647
     {
2608 2648
      if (floor($Value2) == 0) { return(0); }
@@ -5792,6 +5832,10 @@  discard block
 block discarded – undo
5792 5832
     }
5793 5833
 
5794 5834
    /* Draw a label box */
5835
+
5836
+   /**
5837
+    * @param string $Captions
5838
+    */
5795 5839
    function drawLabelBox($X,$Y,$Title,$Captions,$Format="")
5796 5840
     {
5797 5841
      $NoTitle			= isset($Format["NoTitle"]) ? $Format["NoTitle"] : NULL;
Please login to merge, or discard this patch.
modules/AOR_Charts/lib/pChart/class/pImage.class.php 1 patch
Doc Comments   +29 added lines patch added patch discarded remove patch
@@ -82,6 +82,12 @@  discard block
 block discarded – undo
82 82
    var $LastChartLayout	= CHART_LAST_LAYOUT_REGULAR;	// Last layout : regular or stacked
83 83
 
84 84
    /* Class constructor */
85
+
86
+   /**
87
+    * @param integer $XSize
88
+    * @param integer $YSize
89
+    * @param pData $DataSet
90
+    */
85 91
    function pImage($XSize,$YSize,$DataSet=NULL,$TransparentBackground=FALSE)
86 92
     {
87 93
      $this->TransparentBackground = $TransparentBackground;
@@ -126,6 +132,13 @@  discard block
 block discarded – undo
126 132
     }
127 133
 
128 134
    /* Set the graph area position */
135
+
136
+   /**
137
+    * @param integer $X1
138
+    * @param integer $Y1
139
+    * @param integer $X2
140
+    * @param integer $Y2
141
+    */
129 142
    function setGraphArea($X1,$Y1,$X2,$Y2)
130 143
     {
131 144
      if ( $X2 < $X1 || $X1 == $X2 || $Y2 < $Y1 || $Y1 == $Y2 ) { return(-1); }
@@ -145,6 +158,10 @@  discard block
 block discarded – undo
145 158
     { return($this->YSize); }
146 159
 
147 160
    /* Render the picture to a file */
161
+
162
+   /**
163
+    * @param string $FileName
164
+    */
148 165
    function render($FileName)
149 166
     {
150 167
      if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); }
@@ -268,6 +285,10 @@  discard block
 block discarded – undo
268 285
     { print_r($this->DataSet); }
269 286
 
270 287
    /* Initialise the image map methods */
288
+
289
+   /**
290
+    * @param integer $StorageMode
291
+    */
271 292
    function initialiseImageMap($Name="pChart",$StorageMode=IMAGE_MAP_STORAGE_SESSION,$UniqueID="imageMap",$StorageFolder="tmp")
272 293
     {
273 294
      $this->ImageMapIndex 		= $Name;
@@ -327,6 +348,10 @@  discard block
 block discarded – undo
327 348
     }
328 349
 
329 350
    /* Replace the title of one image map serie */
351
+
352
+   /**
353
+    * @param string $OldTitle
354
+    */
330 355
    function replaceImageMapTitle($OldTitle, $NewTitle)
331 356
     {
332 357
      if ( $this->ImageMapStorageMode == NULL ) { return(-1); }
@@ -403,6 +428,10 @@  discard block
 block discarded – undo
403 428
     }
404 429
 
405 430
    /* Dump the image map */
431
+
432
+   /**
433
+    * @param integer $StorageMode
434
+    */
406 435
    function dumpImageMap($Name="pChart",$StorageMode=IMAGE_MAP_STORAGE_SESSION,$UniqueID="imageMap",$StorageFolder="tmp")
407 436
     {
408 437
      $this->ImageMapIndex 		= $Name;
Please login to merge, or discard this patch.
modules/AOR_Charts/lib/pChart/class/pPie.class.php 1 patch
Doc Comments   +26 added lines patch added patch discarded remove patch
@@ -697,6 +697,10 @@  discard block
 block discarded – undo
697 697
     }
698 698
 
699 699
    /* Draw the legend of pie chart */
700
+
701
+   /**
702
+    * @param double $X
703
+    */
700 704
    function drawPieLegend($X,$Y,$Format="")
701 705
     {
702 706
      $FontName		= isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName;
@@ -782,6 +786,10 @@  discard block
 block discarded – undo
782 786
     }
783 787
 
784 788
    /* Set the color of the specified slice */
789
+
790
+   /**
791
+    * @param integer $SliceID
792
+    */
785 793
    function setSliceColor($SliceID,$Format="")
786 794
     {
787 795
      $R		= isset($Format["R"]) ? $Format["R"] : 0;
@@ -796,6 +804,13 @@  discard block
 block discarded – undo
796 804
     }
797 805
 
798 806
    /* Internally used compute the label positions */
807
+
808
+   /**
809
+    * @param double $X
810
+    * @param double $Y
811
+    * @param double $Angle
812
+    * @param boolean $Stacked
813
+    */
799 814
    function writePieLabel($X,$Y,$Label,$Angle,$Settings,$Stacked,$Xc=0,$Yc=0,$Radius=0,$Reversed=FALSE)
800 815
     {
801 816
      $LabelOffset	= 30;
@@ -847,6 +862,13 @@  discard block
 block discarded – undo
847 862
     }
848 863
 
849 864
    /* Internally used to shift label positions */
865
+
866
+   /**
867
+    * @param integer $StartAngle
868
+    * @param integer $EndAngle
869
+    * @param double $Offset
870
+    * @param boolean $Reversed
871
+    */
850 872
    function shift($StartAngle,$EndAngle,$Offset,$Reversed)
851 873
     {
852 874
      if ( $Reversed ) { $Offset = -$Offset; }
@@ -1462,6 +1484,10 @@  discard block
 block discarded – undo
1462 1484
    }
1463 1485
 
1464 1486
   /* Reverse an array */
1487
+
1488
+  /**
1489
+   * @param string $Plots
1490
+   */
1465 1491
   function arrayReverse($Plots)
1466 1492
    {
1467 1493
     $Result = "";
Please login to merge, or discard this patch.
modules/AOR_Charts/lib/pChart/class/pSpring.class.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -258,6 +258,11 @@  discard block
 block discarded – undo
258 258
      $this->Data[$SourceID]["Connections"][] = $TargetID;
259 259
     }
260 260
    /* Get the median linked nodes position */
261
+
262
+   /**
263
+    * @param double $X
264
+    * @param double $Y
265
+    */
261 266
    function getMedianOffset($Key,$X,$Y)
262 267
     {
263 268
      $Cpt = 1;
@@ -277,6 +282,10 @@  discard block
 block discarded – undo
277 282
     }
278 283
 
279 284
    /* Return the ID of the attached partner with the biggest weight */
285
+
286
+   /**
287
+    * @return double
288
+    */
280 289
    function getBiggestPartner($Key)
281 290
     {
282 291
      if ( !isset($this->Data[$Key]["Connections"]) ) { return(""); }
Please login to merge, or discard this patch.
modules/AOR_Fields/AOR_Field.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -57,6 +57,9 @@
 block discarded – undo
57 57
 		parent::Basic();
58 58
 	}
59 59
 
60
+    /**
61
+     * @param AOR_Report $parent
62
+     */
60 63
     function save_lines($post_data, $parent, $key = ''){
61 64
 
62 65
         require_once('modules/AOW_WorkFlow/aow_utils.php');
Please login to merge, or discard this patch.
modules/AOR_Reports/AOR_Report.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -322,6 +322,9 @@  discard block
 block discarded – undo
322 322
         return $rows;
323 323
     }
324 324
 
325
+    /**
326
+     * @param string $body
327
+     */
325 328
     private function getMultiGroupFrameHTML($header, $body) {
326 329
         $html = '<div class="multi-group-list" style="border: 1px solid black; padding: 10px;">
327 330
                     <h3>' . $header . '</h3>
@@ -330,6 +333,9 @@  discard block
 block discarded – undo
330 333
         return $html;
331 334
     }
332 335
 
336
+    /**
337
+     * @param string $html
338
+     */
333 339
     private function addDataIdValueToInnertext($html) {
334 340
         preg_match('/\sdata-id-value\s*=\s*"([^"]*)"/', $html, $match);
335 341
         $html = preg_replace('/(>)([^<]*)(<\/\w+>$)/', '$1$2' . $match[1] . '$3', $html);
@@ -920,6 +926,9 @@  discard block
 block discarded – undo
920 926
 
921 927
     }
922 928
 
929
+    /**
930
+     * @param string $query_where
931
+     */
923 932
     private function queryWhereRepair($query_where) {
924 933
 
925 934
         // remove empty parenthesis and fix query syntax
@@ -1030,6 +1039,9 @@  discard block
 block discarded – undo
1030 1039
     }
1031 1040
 
1032 1041
 
1042
+    /**
1043
+     * @param string $type
1044
+     */
1033 1045
     function build_report_query_join($name, $alias, $parentAlias, SugarBean $module, $type, $query = array(),SugarBean $rel_module = null ){
1034 1046
 
1035 1047
         if(!isset($query['join'][$alias])){
Please login to merge, or discard this patch.
modules/AOR_Reports/aor_utils.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -88,6 +88,9 @@
 block discarded – undo
88 88
     return $params;
89 89
 }
90 90
 
91
+/**
92
+ * @param SugarBean $report
93
+ */
91 94
 function getConditionsAsParameters($report, $override = array())
92 95
 {
93 96
     if (empty($report)) {
Please login to merge, or discard this patch.
modules/AOR_Reports/views/view.edit.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -138,6 +138,10 @@
 block discarded – undo
138 138
         return $charts;
139 139
     }
140 140
 
141
+    /**
142
+     * @param string $modulePath
143
+     * @param string $field
144
+     */
141 145
     public function getDisplayForField($modulePath, $field, $reportModule){
142 146
         $modulePathDisplay = array();
143 147
         $currentBean = BeanFactory::getBean($reportModule);
Please login to merge, or discard this patch.