Passed
Push — scrutinizer-code-quality ( eedb15...27193c )
by Adam
54:15 queued 15s
created
include/utils/db_utils.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -42,6 +42,7 @@
 block discarded – undo
42 42
 
43 43
 /**
44 44
  * @deprecated use DBManager::convert() instead.
45
+ * @param string $type
45 46
  */
46 47
 function db_convert($string, $type, $additional_parameters=array(),$additional_parameters_oracle_only=array())
47 48
 	{
Please login to merge, or discard this patch.
include/utils/encryption_utils.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -40,6 +40,10 @@  discard block
 block discarded – undo
40 40
 
41 41
 require_once('include/Pear/Crypt_Blowfish/Blowfish.php');
42 42
 
43
+/**
44
+ * @param string $key
45
+ * @param string $data
46
+ */
43 47
 function sugarEncode($key, $data){
44 48
 	return base64_encode($data);
45 49
 }
@@ -84,6 +88,7 @@  discard block
 block discarded – undo
84 88
  * Uses blowfish to encrypt data and base 64 encodes it. It stores the iv as part of the data
85 89
  * @param STRING key - key to base encoding off of
86 90
  * @param STRING data - string to be encrypted and encoded
91
+ * @param string $key
87 92
  * @return string
88 93
  */
89 94
 function blowfishEncode($key, $data){
@@ -96,6 +101,7 @@  discard block
 block discarded – undo
96 101
  * Uses blowfish to decode data assumes data has been base64 encoded with the iv stored as part of the data
97 102
  * @param STRING key - key to base decoding off of
98 103
  * @param STRING encoded base64 encoded blowfish encrypted data
104
+ * @param string $key
99 105
  * @return string
100 106
  */
101 107
 function blowfishDecode($key, $encoded){
Please login to merge, or discard this patch.
include/utils/file_utils.php 1 patch
Doc Comments   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@  discard block
 block discarded – undo
61 61
     return( $appendpath.$path );
62 62
 }
63 63
 
64
+/**
65
+ * @param string $file
66
+ */
64 67
 function create_cache_directory($file)
65 68
 {
66 69
     $paths = explode('/',$file);
@@ -170,6 +173,9 @@  discard block
 block discarded – undo
170 173
     return( $write_to_file );
171 174
 }
172 175
 
176
+/**
177
+ * @param string $file
178
+ */
173 179
 function create_custom_directory($file)
174 180
 {
175 181
     $paths = explode('/',$file);
@@ -241,8 +247,8 @@  discard block
 block discarded – undo
241 247
 /**
242 248
  * Function to compare two directory structures and return the items in path_a that didn't match in path_b
243 249
  *
244
- * @param	$path_a The path of the first root directory to scan - must end with '/'
245
- * @param	$path_b The path of the second root directory to scan - must end with '/'
250
+ * @param	string $path_a The path of the first root directory to scan - must end with '/'
251
+ * @param	string $path_b The path of the second root directory to scan - must end with '/'
246 252
  * @param	$ignore_dirs array of filenames/directory names to ignore running md5 on - default 'cache' and 'upload'
247 253
  * @result	array containing all the md5s of everything in $path_a that didn't have a match in $path_b
248 254
  */
@@ -374,7 +380,7 @@  discard block
 block discarded – undo
374 380
  * extension and returns a best guess mime content type.
375 381
  *
376 382
  * @param $filename String of filename to return mime content type
377
- * @return mime content type as String value (defaults to 'application/octet-stream' for filenames with extension, empty otherwise)
383
+ * @return string content type as String value (defaults to 'application/octet-stream' for filenames with extension, empty otherwise)
378 384
  *
379 385
  */
380 386
 function get_mime_content_type_from_filename($filename)
@@ -467,6 +473,9 @@  discard block
 block discarded – undo
467 473
 
468 474
 }
469 475
 */
476
+/**
477
+ * @param string $name
478
+ */
470 479
 function cleanFileName($name)
471 480
 {
472 481
     return preg_replace('/[^\w-._]+/i', '', $name);
Please login to merge, or discard this patch.
include/utils/layout_utils.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
  *
51 51
  * @param  $form_title string to display as the title in the header
52 52
  * @param  $other_text string to next to the title.  Typically used for form buttons.
53
- * @param  $show_help  boolean which determines if the print and help links are shown.
53
+ * @param  false|string $show_help  boolean which determines if the print and help links are shown.
54 54
  * @return string HTML
55 55
  */
56 56
 function get_form_header(
@@ -165,9 +165,10 @@  discard block
 block discarded – undo
165 165
  *
166 166
  * @deprecated use SugarView::getModuleTitle() for MVC modules, or getClassicModuleTitle() for non-MVC modules
167 167
  *
168
- * @param  $module       string  to next to the title.  Typically used for form buttons.
169
- * @param  $module_title string  to display as the module title
168
+ * @param  string $module       string  to next to the title.  Typically used for form buttons.
169
+ * @param  string $module_title string  to display as the module title
170 170
  * @param  $show_help    boolean which determines if the print and help links are shown.
171
+ * @param boolean $show_create
171 172
  * @return string HTML
172 173
  */
173 174
 function get_module_title(
Please login to merge, or discard this patch.
include/utils/LogicHook.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	/**
74 74
 	 * Static Function which returns and instance of LogicHook
75 75
 	 *
76
-	 * @return unknown
76
+	 * @return LogicHook
77 77
 	 */
78 78
 	static function initialize(){
79 79
 		if(empty($GLOBALS['logic_hook']))
@@ -153,6 +153,9 @@  discard block
 block discarded – undo
153 153
 		return $hook_array;
154 154
 	}
155 155
 
156
+	/**
157
+	 * @param string $module_dir
158
+	 */
156 159
 	public function getHooks($module_dir, $refresh = false)
157 160
 	{
158 161
 	    if($refresh || !isset(self::$hooks[$module_dir])) {
@@ -169,7 +172,6 @@  discard block
 block discarded – undo
169 172
 	 * @param string $module_dir
170 173
 	 * @param string $event
171 174
 	 * @param array $arguments
172
-	 * @param SugarBean $bean
173 175
 	 */
174 176
 	function call_custom_logic($module_dir, $event, $arguments = null){
175 177
 		// declare the hook array variable, it will be defined in the included file.
@@ -198,7 +200,6 @@  discard block
 block discarded – undo
198 200
 	 * @param array $hook_array
199 201
 	 * @param string $event
200 202
 	 * @param array $arguments
201
-	 * @param SugarBean $bean
202 203
 	 */
203 204
 	function process_hooks($hook_array, $event, $arguments){
204 205
 		// Now iterate through the array for the appropriate hook
Please login to merge, or discard this patch.
include/utils/progress_bar_utils.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -92,6 +92,10 @@  discard block
 block discarded – undo
92 92
 	progress_bar_flush();
93 93
 }
94 94
 
95
+/**
96
+ * @param string $name
97
+ * @param integer $total
98
+ */
95 99
 function display_progress_bar($name,$current, $total)
96 100
 {
97 101
 	$percent = $current/$total * 100;
@@ -115,6 +119,10 @@  discard block
 block discarded – undo
115 119
 	progress_bar_flush();
116 120
 }
117 121
 
122
+/**
123
+ * @param string $name
124
+ * @param integer $total
125
+ */
118 126
 function update_progress_bar($name,$current, $total)
119 127
 {
120 128
 	$percent = $current/$total * 100;
Please login to merge, or discard this patch.
include/utils/sugar_file_utils.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
  * 0777 by default.
49 49
  *
50 50
  * @param $pathname - String value of the directory to create
51
- * @param $mode - The integer value of the permissions mode to set the created directory to
51
+ * @param integer $mode - The integer value of the permissions mode to set the created directory to
52 52
  * @param $recursive - boolean value indicating whether or not to create recursive directories if needed
53 53
  * @param $context
54 54
  * @return boolean - Returns true on success false on failure
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
  * 0777 by default.
104 104
  *
105 105
  * @param $filename - String value of the file to create
106
- * @param $mode - The integer value of the permissions mode to set the created file to
106
+ * @param string $mode - The integer value of the permissions mode to set the created file to
107 107
  * @param $$use_include_path - boolean value indicating whether or not to search the the included_path
108 108
  * @param $context
109
- * @return boolean - Returns a file pointer on success, false otherwise
109
+ * @return resource - Returns a file pointer on success, false otherwise
110 110
  */
111 111
 function sugar_fopen($filename, $mode, $use_include_path=false, $context=null){
112 112
 	//check to see if the file exists, if not then use touch to create it.
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
  *
133 133
  * @param $filename - String value of the file to create
134 134
  * @param $data - The data to be written to the file
135
- * @param $flags - int as specifed by file_put_contents parameters
135
+ * @param integer $flags - int as specifed by file_put_contents parameters
136 136
  * @param $context
137 137
  * @return int - Returns the number of bytes written to the file, false otherwise.
138 138
  */
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
  * This is an atomic version of sugar_file_put_contents.  It attempts to circumvent the shortcomings of file_put_contents
163 163
  * by creating a temporary unique file and then doing an atomic rename operation.
164 164
  *
165
- * @param $filename - String value of the file to create
166
- * @param $data - The data to be written to the file
165
+ * @param string $filename - String value of the file to create
166
+ * @param string $data - The data to be written to the file
167 167
  * @param string $mode String value of the parameter to specify the type of access you require to the file stream
168 168
  * @param boolean $use_include_path set to '1' or TRUE if you want to search for the file in the include_path too
169 169
  * @param context $context Context to pass into fopen operation
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
  * @param $filename - String value of the file to create
213 213
  * @param $use_include_path - boolean value indicating whether or not to search the the included_path
214 214
  * @param $context
215
- * @return string|boolean - Returns a file data on success, false otherwise
215
+ * @return false|string - Returns a file data on success, false otherwise
216 216
  */
217 217
 function sugar_file_get_contents($filename, $use_include_path=false, $context=null){
218 218
 	//check to see if the file exists, if not then use touch to create it.
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
  * may be set with the permissions specified in the configuration file (if set).
242 242
  *
243 243
  * @param $filename - The name of the file being touched.
244
- * @param $time - The touch time. If time  is not supplied, the current system time is used.
244
+ * @param integer $time - The touch time. If time  is not supplied, the current system time is used.
245 245
  * @param $atime - If present, the access time of the given filename is set to the value of atime
246 246
  * @return boolean - Returns TRUE on success or FALSE on failure.
247 247
  *
Please login to merge, or discard this patch.
include/utils/zip_utils.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@  discard block
 block discarded – undo
48 48
 if ( isset($GLOBALS['log']) && class_implements($GLOBALS['log'],'LoggerTemplate') ) {
49 49
     $GLOBALS['log']->deprecated('Use of PCLZip has been deprecated. Please enable the zip extension in your PHP install ( see http://www.php.net/manual/en/zip.installation.php for more details ).');
50 50
 }
51
+/**
52
+ * @param false|string $zip_dir
53
+ */
51 54
 function unzip( $zip_archive, $zip_dir, $forceOverwrite = false ){
52 55
     if( !is_dir( $zip_dir ) ){
53 56
         if (!defined('SUGAR_PHPUNIT_RUNNER'))
@@ -100,6 +103,9 @@  discard block
 block discarded – undo
100 103
     }
101 104
 }
102 105
 
106
+/**
107
+ * @param string $zip_dir
108
+ */
103 109
 function zip_dir( $zip_dir, $zip_archive ){
104 110
     $archive    = new PclZip( $zip_archive );
105 111
     $v_list     = $archive->create( $zip_dir );
Please login to merge, or discard this patch.
include/vCard.php 1 patch
Doc Comments   +29 added lines patch added patch discarded remove patch
@@ -87,9 +87,23 @@  discard block
 block discarded – undo
87 87
 	function setTitle($title){
88 88
 		$this->setProperty("TITLE",$title );
89 89
 	}
90
+
91
+	/**
92
+	 * @param string $org
93
+	 * @param string $dep
94
+	 */
90 95
 	function setORG($org, $dep){
91 96
 		$this->setProperty("ORG","$org;$dep" );
92 97
 	}
98
+
99
+	/**
100
+	 * @param string $address
101
+	 * @param string $city
102
+	 * @param string $state
103
+	 * @param string $postal
104
+	 * @param string $country
105
+	 * @param string $type
106
+	 */
93 107
 	function setAddress($address, $city, $state,$postal, $country, $type, $encoding=''){
94 108
 		if(!empty($encoding)) {
95 109
 			$encoding = ";ENCODING={$encoding}";
@@ -97,16 +111,27 @@  discard block
 block discarded – undo
97 111
 		$this->setProperty("ADR;$type$encoding",";;$address;$city;$state;$postal;$country" );
98 112
 	}
99 113
 
114
+	/**
115
+	 * @param string $first_name
116
+	 * @param string $last_name
117
+	 */
100 118
 	function setName($first_name, $last_name, $prefix){
101 119
 		$this->name = strtr($first_name.'_'.$last_name, ' ' , '_');
102 120
 		$this->setProperty('N',$last_name.';'.$first_name.';;'.$prefix );
103 121
 		$this->setProperty('FN',"$prefix $first_name $last_name");
104 122
 	}
105 123
 
124
+	/**
125
+	 * @param string $address
126
+	 */
106 127
 	function setEmail($address){
107 128
 		$this->setProperty('EMAIL;INTERNET', $address);
108 129
 	}
109 130
 
131
+	/**
132
+	 * @param string $number
133
+	 * @param string $type
134
+	 */
110 135
 	function setPhoneNumber( $number, $type)
111 136
 	{
112 137
 		if($type != 'FAX') {
@@ -116,6 +141,10 @@  discard block
 block discarded – undo
116 141
 		    $this->setProperty("TEL;WORK;$type", $number);
117 142
 		}
118 143
 	}
144
+
145
+	/**
146
+	 * @param string $date
147
+	 */
119 148
 	function setBirthDate($date){
120 149
 			$this->setProperty('BDAY',$date);
121 150
 	}
Please login to merge, or discard this patch.