Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
include/SugarFields/Fields/Base/SugarFieldBase.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -114,11 +114,17 @@  discard block
 block discarded – undo
114 114
     }
115 115
 
116 116
 
117
+    /**
118
+     * @return string
119
+     */
117 120
     public function unformatField($formattedField, $vardef){
118 121
         // The base field doesn't do any formatting, so override it in subclasses for more specific actions
119 122
         return $formattedField;
120 123
     }
121 124
 
125
+    /**
126
+     * @param string $view
127
+     */
122 128
     function getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex = -1, $view){
123 129
     	$this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
124 130
 
@@ -376,6 +382,9 @@  discard block
 block discarded – undo
376 382
 
377 383
     }
378 384
 
385
+    /**
386
+     * @param string $fieldType
387
+     */
379 388
     protected function getAccessKey($vardef, $fieldType = null, $module = null) {
380 389
         global $app_strings;
381 390
 
Please login to merge, or discard this patch.
include/SugarFields/Fields/Bool/SugarFieldBool.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 class SugarFieldBool extends SugarFieldBase {
45 45
 	/**
46 46
 	 *
47
-	 * @return The html for a drop down if the search field is not 'my_items_only' or a dropdown for all other fields.
47
+	 * @return string html for a drop down if the search field is not 'my_items_only' or a dropdown for all other fields.
48 48
 	 *			This strange behavior arises from the special needs of PM. They want the my items to be checkboxes and all other boolean fields to be dropdowns.
49 49
 	 * @author Navjeet Singh
50 50
 	 * @param $parentFieldArray -
Please login to merge, or discard this patch.
include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -351,6 +351,10 @@  discard block
 block discarded – undo
351 351
      * Check if the template is cached
352 352
      * return a bool
353 353
      */
354
+
355
+    /**
356
+     * @param string $cacheRowFile
357
+     */
354 358
     function checkTemplate($cacheRowFile){
355 359
         if(inDeveloperMode() || !empty($_SESSION['developerMode'])){
356 360
             return false;
@@ -502,6 +506,11 @@  discard block
 block discarded – undo
502 506
 
503 507
 
504 508
 
509
+    /**
510
+     * @param string $view
511
+     *
512
+     * @return string
513
+     */
505 514
     function findTemplate($view){
506 515
         static $tplCache = array();
507 516
 
Please login to merge, or discard this patch.
include/SugarFields/Fields/Currency/SugarFieldCurrency.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,9 +102,8 @@
 block discarded – undo
102 102
     /**
103 103
      * format the currency field based on system locale values for currency
104 104
      * Note that this may be different from the precision specified in the vardefs.
105
-     * @param string $rawfield value of the field
106
-     * @param string $somewhere vardef for the field being processed
107
-     * @return number formatted according to currency settings
105
+     * @param string $rawField value of the field
106
+     * @return string formatted according to currency settings
108 107
      */
109 108
     public function formatField($rawField, $vardef)
110 109
     {
Please login to merge, or discard this patch.
include/SugarFields/Fields/Enum/SugarFieldEnum.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -94,6 +94,7 @@
 block discarded – undo
94 94
     
95 95
     /**
96 96
      * @see SugarFieldBase::importSanitize()
97
+     * @param string $value
97 98
      */
98 99
     public function importSanitize(
99 100
         $value,
Please login to merge, or discard this patch.
include/SugarFields/Fields/Image/SugarFieldImage.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -112,6 +112,9 @@
 block discarded – undo
112 112
 
113 113
     }
114 114
 
115
+    /**
116
+     * @param UploadFile $upload_file
117
+     */
115 118
     public function verify_image($upload_file){
116 119
         global $sugar_config;
117 120
 
Please login to merge, or discard this patch.
include/SugarFields/Parsers/DetailViewMetaParser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 /**
67 67
  * parse
68 68
  * 
69
- * @param $filePath The file path of the HTML file to parse
69
+ * @param string $filePath The file path of the HTML file to parse
70 70
  * @param $vardefs The module's vardefs
71 71
  * @param $moduleDir The module's directory
72 72
  * @param $merge boolean value indicating whether or not to merge the parsed contents
Please login to merge, or discard this patch.
include/SugarFields/Parsers/MetaParser.php 1 patch
Doc Comments   +23 added lines, -7 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 /**
97 97
  * getFormElementsNames
98 98
  * Parses for the name values of input, select, textarea types from string content
99
- * @param $contents The String contents to parse
99
+ * @param string $contents The String contents to parse
100 100
  * @return $matches Array of name/value pairs
101 101
  */
102 102
 function getFormElementsNames($contents) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 /**
109 109
  * getTagAttribute
110 110
  * Returns the name/value of a tag attribute where name is set to $name
111
- * @param $name The name of the attribute
111
+ * @param string $name The name of the attribute
112 112
  * @param $contents The contents to parse
113 113
  * @param $filter Option regular expression to filter value
114 114
  * @return Array of name/value for matching attribute
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
  * and method call getElementsByType("<td>", $contents) returns
164 164
  * "<td>Text <table><tr><td>a</td></tr></table></td>"
165 165
  *
166
- * @param $type The type of element to parse out and return
166
+ * @param string $type The type of element to parse out and return
167 167
  * @return a tag element format Array
168 168
  */
169 169
 function getElementsByType($type, $contents) {
@@ -208,6 +208,7 @@  discard block
 block discarded – undo
208 208
 /**
209 209
  * getElementValue
210 210
  *
211
+ * @param string $type
211 212
  */
212 213
 function getElementValue($type, $contents, $filter = "(.*?)") {
213 214
    $exp = "'<".$type."[^>]*?>".$filter."</".$type."[^>]*?>'si";
@@ -244,7 +245,7 @@  discard block
 block discarded – undo
244 245
  * Returns the highest number of <td>...</td> blocks within a <tr>...</tr> block.
245 246
  * @param $contents The table contents to parse
246 247
  * @param $filter Optional filter to parse for an attribute within the td block.
247
- * @return The maximum column count
248
+ * @return integer maximum column count
248 249
  */
249 250
 function getMaxColumns($contents, $filter) {
250 251
    preg_match_all("'(<tr[^>]*?>)(.*?)(</tr[^>]*?>)'si", $contents, $matches, PREG_SET_ORDER);
@@ -281,6 +282,9 @@  discard block
 block discarded – undo
281 282
  * trimHTML
282 283
  * This function removes the \r (return), \n (newline) and \t (tab) markup from string
283 284
  */
285
+/**
286
+ * @param string $contents
287
+ */
284 288
 function trimHTML($contents) {
285 289
    $contents = str_replace(array("\r"), array(""), $contents);
286 290
    $contents = str_replace(array("\n"), array(""), $contents);
@@ -342,6 +346,9 @@  discard block
 block discarded – undo
342 346
 
343 347
 }
344 348
 
349
+/**
350
+ * @param string $javascript
351
+ */
345 352
 static function parseDelimiters($javascript) {
346 353
 	$newJavascript = '';
347 354
 	$scriptLength = strlen($javascript);
@@ -441,7 +448,7 @@  discard block
 block discarded – undo
441 448
  * dirList
442 449
  * Utility method to list all the files in a given directory.
443 450
  *
444
- * @param $directory The directory to scan
451
+ * @param string $directory The directory to scan
445 452
  * @return $results The files in the directory that were found
446 453
  */
447 454
 function dirList ($directory) {
@@ -496,6 +503,9 @@  discard block
 block discarded – undo
496 503
    return null;
497 504
 }
498 505
 
506
+/**
507
+ * @param string $moduleDir
508
+ */
499 509
 function applyPreRules($moduleDir, $panels) {
500 510
    if(file_exists("include/SugarFields/Parsers/Rules/".$moduleDir."ParseRule.php")) {
501 511
 	  require_once("include/SugarFields/Parsers/Rules/".$moduleDir."ParseRule.php");
@@ -506,6 +516,9 @@  discard block
 block discarded – undo
506 516
    return $panels;
507 517
 }
508 518
 
519
+/**
520
+ * @param string $moduleDir
521
+ */
509 522
 function applyRules($moduleDir, $panels) {
510 523
    return $this->applyPostRules($moduleDir, $panels);
511 524
 }
@@ -537,6 +550,9 @@  discard block
 block discarded – undo
537 550
    return $panels;
538 551
 }
539 552
 
553
+/**
554
+ * @param string $moduleDir
555
+ */
540 556
 function createFileContents($moduleDir, $panels, $templateMeta=array(), $htmlFilePath) {
541 557
 
542 558
 $header = "<?php\n\n";
@@ -587,7 +603,7 @@  discard block
 block discarded – undo
587 603
  * mergePanels
588 604
  * This function merges the $panels Array against the $masterCopy's meta data definition
589 605
  * @param $panels meta data Array to merge
590
- * @param $moduleDir Directory name of the module
606
+ * @param string $moduleDir Directory name of the module
591 607
  * @param $masterCopy file path to the meta data master copy
592 608
  * @return Array of merged $panel definition
593 609
  */
@@ -680,7 +696,7 @@  discard block
 block discarded – undo
680 696
  * mergeTemplateMeta
681 697
  * This function merges the $templateMeta Array against the $masterCopy's meta data definition
682 698
  * @param $templateMeta meta data Array to merge
683
- * @param $moduleDir Directory name of the module
699
+ * @param string $moduleDir Directory name of the module
684 700
  * @param $masterCopy file path to the meta data master copy
685 701
  * @return Array of merged $templateMeta definition
686 702
  */
Please login to merge, or discard this patch.
include/SugarFields/Parsers/Rules/AddressRule.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
  * have not been moved from the address panel
114 114
  * 
115 115
  * @param $addressPanel Array of address panel contents
116
- * @param $suffix The address suffix (billing, shipping, primary, alternate) to check for
116
+ * @param string $suffix The address suffix (billing, shipping, primary, alternate) to check for
117 117
  * @return boolean
118 118
  */
119 119
 function hasAddressFieldsIntact($addressPanel, $suffix) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
  * This function scans the panels and locates the street address field for the given key
136 136
  * and replaces the Array definition (from the merging process) with a String value.
137 137
  * @param $panels Array of the view's panels
138
- * @param $street String key value of the street to search for
138
+ * @param string $street String key value of the street to search for
139 139
  * @returns $panels Array of view's panels with street value substituted
140 140
  */
141 141
 function removeStreetFieldOverride($panels, $street) {
Please login to merge, or discard this patch.