Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/ModuleBuilder/views/view.dashlet.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -177,6 +177,9 @@
 block discarded – undo
177 177
         return $ajax ;
178 178
     }
179 179
 
180
+    /**
181
+     * @param AbstractMetaDataParser|null $parser
182
+     */
180 183
     function constructSmarty ($parser)
181 184
     {
182 185
         global $mod_strings;
Please login to merge, or discard this patch.
data/Link.php 1 patch
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -386,6 +386,9 @@  discard block
 block discarded – undo
386 386
 		else return '';
387 387
 	}
388 388
 
389
+	/**
390
+	 * @param string $optional_array
391
+	 */
389 392
 	function _add_optional_where_clause($optional_array, $add_and='',$prefix='') {
390 393
 
391 394
 		if (!empty($prefix)) $prefix.='.';
@@ -612,6 +615,9 @@  discard block
 block discarded – undo
612 615
 		return $this->_bean->build_related_list($query, $template);
613 616
 	}
614 617
 
618
+	/**
619
+	 * @param boolean $bean_is_lhs
620
+	 */
615 621
 	function _add_one_to_many_table_based($key,$bean_is_lhs) {
616 622
 
617 623
 		if ($bean_is_lhs) {
@@ -825,6 +831,9 @@  discard block
 block discarded – undo
825 831
 		$result=$this->_db->query($query, true);
826 832
 	}
827 833
 
834
+	/**
835
+	 * @param string $where
836
+	 */
828 837
 	function _update_row(&$value_array,$table_name,$where) {
829 838
 
830 839
 		$query='UPDATE '.$table_name.' SET ';
@@ -1052,6 +1061,9 @@  discard block
 block discarded – undo
1052 1061
 	}
1053 1062
 
1054 1063
 
1064
+	/**
1065
+	 * @param string $def_name
1066
+	 */
1055 1067
 	function _get_link_table_definition($table_name,$def_name) {
1056 1068
 	    global $dictionary;
1057 1069
 
@@ -1103,6 +1115,10 @@  discard block
 block discarded – undo
1103 1115
      * Return the name of the role field for the passed many to many table.
1104 1116
      * if there is no role filed : return false
1105 1117
      */
1118
+
1119
+    /**
1120
+     * @return string
1121
+     */
1106 1122
     function _get_link_table_role_field($table_name) {
1107 1123
         $varDefs = $this->_get_link_table_definition($table_name, 'fields');
1108 1124
         $role_field = false;
Please login to merge, or discard this patch.
data/SugarBean.php 1 patch
Doc Comments   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -736,6 +736,11 @@  discard block
 block discarded – undo
736 736
         return $parentbean->process_union_list_query($parentbean, $final_query, $row_offset, $limit, $max, '', $subpanel_def, $final_query_rows, $secondary_queries);
737 737
     }
738 738
 
739
+    /**
740
+     * @param aSubPanel $subpanel_def
741
+     * @param SugarBean $parentbean
742
+     * @param string $order_by
743
+     */
739 744
     protected static function build_sub_queries_for_union($subpanel_list, $subpanel_def, $parentbean, $order_by)
740 745
     {
741 746
         global $beanList;
@@ -833,7 +838,7 @@  discard block
 block discarded – undo
833 838
      * executes the query and returns fetched data.
834 839
      *
835 840
      * Internal function, do not override.
836
-     * @param object $parent_bean
841
+     * @param SugarBean $parent_bean
837 842
      * @param string $query query to be processed.
838 843
      * @param int $row_offset
839 844
      * @param int $limit optional, default -1
@@ -3792,7 +3797,7 @@  discard block
 block discarded – undo
3792 3797
      * The fetched data is then set into the bean. The function also processes the fetched data by formatting
3793 3798
      * date/time and numeric values.
3794 3799
      *
3795
-     * @param string|int $id Optional, default -1, is set to -1 id value from the bean is used, else, passed value is used
3800
+     * @param integer $id Optional, default -1, is set to -1 id value from the bean is used, else, passed value is used
3796 3801
      * @param bool $encode Optional, default true, encodes the values fetched from the database.
3797 3802
      * @param bool $deleted Optional, default true, if set to false deleted filter will not be added.
3798 3803
      * @return SugarBean
@@ -4633,7 +4638,7 @@  discard block
 block discarded – undo
4633 4638
     /**
4634 4639
      * Returns path for files of bean or false on error
4635 4640
      *
4636
-     * @return bool|string
4641
+     * @return false|string
4637 4642
      */
4638 4643
     public function deleteFileDirectory()
4639 4644
     {
@@ -4885,8 +4890,8 @@  discard block
 block discarded – undo
4885 4890
      * Internal function, do not override.
4886 4891
      *
4887 4892
      * @param string $query - the query that should be executed to build the list
4888
-     * @param object $template - The object that should be used to copy the records
4889
-     * @param array $field_list List of  fields.
4893
+     * @param Contact $template - The object that should be used to copy the records
4894
+     * @param string[] $field_list List of  fields.
4890 4895
      * @return array
4891 4896
      */
4892 4897
     public function build_related_list2($query, &$template, &$field_list)
@@ -4999,7 +5004,7 @@  discard block
 block discarded – undo
4999 5004
      * @param array @fields_array  array of name value pairs used to construct query.
5000 5005
      * @param bool $encode Optional, default true, encode fetched data.
5001 5006
      * @param bool $deleted Optional, default true, if set to false deleted filter will not be added.
5002
-     * @return object Instance of this bean with fetched data.
5007
+     * @return null|SugarBean Instance of this bean with fetched data.
5003 5008
      */
5004 5009
     public function retrieve_by_string_fields($fields_array, $encode = true, $deleted = true)
5005 5010
     {
@@ -5139,6 +5144,9 @@  discard block
 block discarded – undo
5139 5144
         }
5140 5145
     }
5141 5146
 
5147
+    /**
5148
+     * @param string $table
5149
+     */
5142 5150
     public function set_relationship($table, $relate_values, $check_duplicates = true, $do_update = false, $data_values = null)
5143 5151
     {
5144 5152
         $where = '';
Please login to merge, or discard this patch.
include/HTTP_WebDAV_Server/Tools/_parse_proppatch.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -73,6 +73,7 @@
 block discarded – undo
73 73
      * constructor
74 74
      *
75 75
      * @param  string  path of input stream
76
+     * @param string $path
76 77
      * @access public
77 78
      */
78 79
     function __construct($path)
Please login to merge, or discard this patch.
include/ListView/ListViewDisplay.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -75,6 +75,9 @@
 block discarded – undo
75 75
 		$this->searchColumns = array () ;
76 76
 	}
77 77
 
78
+	/**
79
+	 * @param string $moduleDir
80
+	 */
78 81
 	function shouldProcess($moduleDir){
79 82
 		$searching = false;
80 83
 		$sessionSearchQuery = "{$moduleDir}2_QUERY_QUERY";
Please login to merge, or discard this patch.
include/resource/ResourceManager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
  * It will create a SoapResourceObserver instance if the $module parameter is set to
73 73
  * 'Soap'; otherwise, it will try to create a WebResourceObserver instance.
74 74
  * @param $module The module value used to create the corresponding observer
75
- * @return boolean value indicating whether or not an observer was successfully setup
75
+ * @return null|boolean value indicating whether or not an observer was successfully setup
76 76
  */
77 77
 public function setup($module) {
78 78
 	//Check if config.php exists
Please login to merge, or discard this patch.
include/SuiteMozaik.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -86,6 +86,9 @@  discard block
 block discarded – undo
86 86
         return 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam tempus odio ante, in feugiat ex pretium eu. In pharetra tincidunt urna et malesuada. Etiam aliquet auctor justo eu placerat. In nec sollicitudin enim. Nulla facilisi. In viverra velit turpis, et lobortis nunc eleifend id. Curabitur semper tincidunt vulputate. Nullam fermentum pellentesque ullamcorper.';
87 87
     }
88 88
 
89
+    /**
90
+     * @param integer $width
91
+     */
89 92
     private function getContentImageSample($width = null) {
90 93
         if(is_numeric($width)) {
91 94
             $width = ' width="' . $width . '"';
@@ -190,6 +193,9 @@  discard block
 block discarded – undo
190 193
         return $mozaikHTML;
191 194
     }
192 195
 
196
+    /**
197
+     * @param string $elementId
198
+     */
193 199
     private function getRefreshTextareaScript($textareaId, $elementId, $width = 'initial') {
194 200
         if(is_numeric($width)) {
195 201
             $width .= 'px';
Please login to merge, or discard this patch.
include/utils.php 1 patch
Doc Comments   +72 added lines, -7 removed lines patch added patch discarded remove patch
@@ -823,6 +823,7 @@  discard block
 block discarded – undo
823 823
  * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
824 824
  * All Rights Reserved.
825 825
  * Contributor(s): ______________________________________..
826
+ * @param boolean $always_copy
826 827
  */
827 828
 function safe_map_named($request_var, &$focus, $member_var, $always_copy)
828 829
 {
@@ -1245,6 +1246,7 @@  discard block
 block discarded – undo
1245 1246
  * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
1246 1247
  * All Rights Reserved.
1247 1248
  * Contributor(s): ______________________________________..
1249
+ * @param string $varname
1248 1250
  */
1249 1251
 function return_session_value_or_default($varname, $default)
1250 1252
 {
@@ -1357,6 +1359,9 @@  discard block
 block discarded – undo
1357 1359
     return $guid;
1358 1360
 }
1359 1361
 
1362
+/**
1363
+ * @param integer $characters
1364
+ */
1360 1365
 function create_guid_section($characters)
1361 1366
 {
1362 1367
     $return = '';
@@ -1367,6 +1372,10 @@  discard block
 block discarded – undo
1367 1372
     return $return;
1368 1373
 }
1369 1374
 
1375
+/**
1376
+ * @param string $string
1377
+ * @param integer $length
1378
+ */
1370 1379
 function ensure_length(&$string, $length)
1371 1380
 {
1372 1381
     $strlen = strlen($string);
@@ -1477,6 +1486,9 @@  discard block
 block discarded – undo
1477 1486
 }
1478 1487
 
1479 1488
 // Check if user is admin for a specific module.
1489
+/**
1490
+ * @param string $module
1491
+ */
1480 1492
 function is_admin_for_module($user, $module)
1481 1493
 {
1482 1494
     if (!isset($user)) {
@@ -1539,6 +1551,7 @@  discard block
 block discarded – undo
1539 1551
  * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
1540 1552
  * All Rights Reserved.
1541 1553
  * Contributor(s): ______________________________________..
1554
+ * @param string $selected
1542 1555
  */
1543 1556
 function get_select_options($option_list, $selected)
1544 1557
 {
@@ -1833,7 +1846,7 @@  discard block
 block discarded – undo
1833 1846
 /**
1834 1847
  * returns a default array of XSS tags to clean.
1835 1848
  *
1836
- * @return array
1849
+ * @return string
1837 1850
  */
1838 1851
 function getDefaultXssTags()
1839 1852
 {
@@ -1862,6 +1875,7 @@  discard block
 block discarded – undo
1862 1875
  * Remove potential xss vectors from strings.
1863 1876
  *
1864 1877
  * @param string str String to search for XSS attack vectors
1878
+ * @param string $str
1865 1879
  *
1866 1880
  * @deprecated
1867 1881
  *
@@ -1879,6 +1893,7 @@  discard block
 block discarded – undo
1879 1893
  *
1880 1894
  * @param string str String to search for XSS attack vectors
1881 1895
  * @param bool cleanImg Flag to allow <img> tags to survive - only used by InboundEmail for inline images.
1896
+ * @param string $str
1882 1897
  *
1883 1898
  * @return array Array of matches, empty on clean string
1884 1899
  */
@@ -1959,6 +1974,7 @@  discard block
 block discarded – undo
1959 1974
  *
1960 1975
  * @param string pattern Regex pattern to use
1961 1976
  * @param string str String to parse for badness
1977
+ * @param string $pattern
1962 1978
  *
1963 1979
  * @return array
1964 1980
  */
@@ -2082,6 +2098,7 @@  discard block
 block discarded – undo
2082 2098
 
2083 2099
 /**
2084 2100
  * cleans the given key in superglobals $_GET, $_POST, $_REQUEST.
2101
+ * @param string $key
2085 2102
  */
2086 2103
 function clean_superglobals($key, $filter = 'STANDARD')
2087 2104
 {
@@ -2096,6 +2113,9 @@  discard block
 block discarded – undo
2096 2113
     }
2097 2114
 }
2098 2115
 
2116
+/**
2117
+ * @param string $key
2118
+ */
2099 2119
 function set_superglobals($key, $val)
2100 2120
 {
2101 2121
     $_GET[$key] = $val;
@@ -2203,12 +2223,19 @@  discard block
 block discarded – undo
2203 2223
 }
2204 2224
 
2205 2225
 // Returns TRUE if $str begins with $begin
2226
+/**
2227
+ * @param string $begin
2228
+ */
2206 2229
 function str_begin($str, $begin)
2207 2230
 {
2208 2231
     return substr($str, 0, strlen($begin)) == $begin;
2209 2232
 }
2210 2233
 
2211 2234
 // Returns TRUE if $str ends with $end
2235
+/**
2236
+ * @param string $str
2237
+ * @param string $end
2238
+ */
2212 2239
 function str_end($str, $end)
2213 2240
 {
2214 2241
     return substr($str, strlen($str) - strlen($end)) == $end;
@@ -2273,16 +2300,25 @@  discard block
 block discarded – undo
2273 2300
     return $value;
2274 2301
 }
2275 2302
 
2303
+/**
2304
+ * @param string $category
2305
+ */
2276 2306
 function set_register_value($category, $name, $value)
2277 2307
 {
2278 2308
     return sugar_cache_put("{$category}:{$name}", $value);
2279 2309
 }
2280 2310
 
2311
+/**
2312
+ * @param string $category
2313
+ */
2281 2314
 function get_register_value($category, $name)
2282 2315
 {
2283 2316
     return sugar_cache_retrieve("{$category}:{$name}");
2284 2317
 }
2285 2318
 
2319
+/**
2320
+ * @param string $category
2321
+ */
2286 2322
 function clear_register_value($category, $name)
2287 2323
 {
2288 2324
     return sugar_cache_clear("{$category}:{$name}");
@@ -2486,6 +2522,11 @@  discard block
 block discarded – undo
2486 2522
     return $new_array;
2487 2523
 }
2488 2524
 
2525
+/**
2526
+ * @param DBManager $db
2527
+ * @param string $from_column
2528
+ * @param string $to_id
2529
+ */
2489 2530
 function clone_relationship(&$db, $tables = array(), $from_column, $from_id, $to_id)
2490 2531
 {
2491 2532
     foreach ($tables as $table) {
@@ -2660,6 +2701,10 @@  discard block
 block discarded – undo
2660 2701
     return empty($value) && $value != '0';
2661 2702
 }
2662 2703
 
2704
+/**
2705
+ * @param string $bean_name
2706
+ * @param string $display_columns
2707
+ */
2663 2708
 function get_bean_select_array($add_blank = true, $bean_name, $display_columns, $where = '', $order_by = '', $blank_is_none = false)
2664 2709
 {
2665 2710
     global $beanFiles;
@@ -2841,6 +2886,11 @@  discard block
 block discarded – undo
2841 2886
     //end function js_escape
2842 2887
 }
2843 2888
 
2889
+/**
2890
+ * @param string $str
2891
+ *
2892
+ * @return string
2893
+ */
2844 2894
 function br2nl($str)
2845 2895
 {
2846 2896
     $regex = '#<[^>]+br.+?>#i';
@@ -3368,6 +3418,9 @@  discard block
 block discarded – undo
3368 3418
 if (isset($sugar_config['stack_trace_errors']) && $sugar_config['stack_trace_errors']) {
3369 3419
     set_error_handler('StackTraceErrorHandler');
3370 3420
 }
3421
+/**
3422
+ * @param string $name
3423
+ */
3371 3424
 function get_sub_cookies($name)
3372 3425
 {
3373 3426
     $cookies = array();
@@ -3407,6 +3460,7 @@  discard block
 block discarded – undo
3407 3460
 
3408 3461
 /**
3409 3462
  * For translating the php.ini memory values into bytes.  e.g. input value of '8M' will return 8388608.
3463
+ * @param string $val
3410 3464
  */
3411 3465
 function return_bytes($val)
3412 3466
 {
@@ -3527,6 +3581,9 @@  discard block
 block discarded – undo
3527 3581
  * Given the bean_name which may be plural or singular return the singular
3528 3582
  * bean_name. This is important when you need to include files.
3529 3583
  */
3584
+/**
3585
+ * @return string
3586
+ */
3530 3587
 function get_singular_bean_name($bean_name)
3531 3588
 {
3532 3589
     global $beanFiles, $beanList;
@@ -3570,6 +3627,9 @@  discard block
 block discarded – undo
3570 3627
     return $singular;
3571 3628
 }
3572 3629
 
3630
+/**
3631
+ * @return string
3632
+ */
3573 3633
 function get_label($label_tag, $temp_module_strings)
3574 3634
 {
3575 3635
     global $app_strings;
@@ -3671,7 +3731,7 @@  discard block
 block discarded – undo
3671 3731
 /**
3672 3732
  * In order to have one place to obtain the proper object name. aCase for example causes issues throughout the application.
3673 3733
  *
3674
- * @param string $moduleName
3734
+ * @param string $module_name
3675 3735
  */
3676 3736
 function get_valid_bean_name($module_name)
3677 3737
 {
@@ -4277,6 +4337,9 @@  discard block
 block discarded – undo
4277 4337
  * @return string Relative pathname of the located icon, or '' if not found
4278 4338
  */
4279 4339
 
4340
+/**
4341
+ * @param string $iconFileName
4342
+ */
4280 4343
 function _getIcon($iconFileName)
4281 4344
 {
4282 4345
     $iconName = "icon_{$iconFileName}.gif";
@@ -4305,7 +4368,7 @@  discard block
 block discarded – undo
4305 4368
  * Function to grab the correct icon image for Studio.
4306 4369
  *
4307 4370
  * @param string $iconFileName Name of the icon file
4308
- * @param string $altfilename  Name of a fallback icon file (displayed if the imagefilename doesn't exist)
4371
+ * @param string $altFileName  Name of a fallback icon file (displayed if the imagefilename doesn't exist)
4309 4372
  * @param string $width        Width of image
4310 4373
  * @param string $height       Height of image
4311 4374
  * @param string $align        Alignment of image
@@ -4331,7 +4394,6 @@  discard block
 block discarded – undo
4331 4394
 /**
4332 4395
  * Function to grab the correct icon image for Dashlets Dialog.
4333 4396
  *
4334
- * @param string $filename Location of the icon file
4335 4397
  * @param string $module   Name of the module to fall back onto if file does not exist
4336 4398
  * @param string $width    Width of image
4337 4399
  * @param string $height   Height of image
@@ -4776,7 +4838,7 @@  discard block
 block discarded – undo
4776 4838
  *
4777 4839
  * @param string $version
4778 4840
  *
4779
- * @return version
4841
+ * @return string
4780 4842
  */
4781 4843
 function getMajorMinorVersion($version)
4782 4844
 {
@@ -4941,6 +5003,9 @@  discard block
 block discarded – undo
4941 5003
     }
4942 5004
 }
4943 5005
 
5006
+/**
5007
+ * @param string $field_name
5008
+ */
4944 5009
 function order_beans($beans, $field_name)
4945 5010
 {
4946 5011
     //Since php 5.2 doesn't include closures, we must use a global to pass the order field to cmp_beans.
@@ -5086,7 +5151,7 @@  discard block
 block discarded – undo
5086 5151
  *
5087 5152
  * @param $file String of filename to check
5088 5153
  *
5089
- * @return $file String of filename including custom directory if found
5154
+ * @return string String of filename including custom directory if found
5090 5155
  */
5091 5156
 function get_custom_file_if_exists($file)
5092 5157
 {
@@ -5243,7 +5308,7 @@  discard block
 block discarded – undo
5243 5308
 /**
5244 5309
  * Gets the list of "*type_display*".
5245 5310
  *
5246
- * @return array
5311
+ * @return string[]
5247 5312
  */
5248 5313
 function getTypeDisplayList()
5249 5314
 {
Please login to merge, or discard this patch.
modules/Administration/Administration.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -160,6 +160,10 @@
 block discarded – undo
160 160
         $this->retrieveSettings(false, true);
161 161
     }
162 162
 
163
+    /**
164
+     * @param string|false $category
165
+     * @param string|false $key
166
+     */
163 167
     function saveSetting($category, $key, $value) {
164 168
         $result = $this->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$category}' AND name = '{$key}'");
165 169
         $row = $this->db->fetchByAssoc($result);
Please login to merge, or discard this patch.