Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/UpgradeWizard/SugarMerge/SearchMerge.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -127,6 +127,10 @@
 block discarded – undo
127 127
 		$this->newData[$this->module] = $this->newData[$this->module][$this->viewDefs];
128 128
 		
129 129
 	}
130
+
131
+	/**
132
+	 * @param string $to
133
+	 */
130 134
 	public function save($to){
131 135
 		return write_array_to_file("$this->varName['$this->module']", $this->newData[$this->module], $to);
132 136
 	}
Please login to merge, or discard this patch.
modules/UpgradeWizard/uw_ajax.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@
 block discarded – undo
48 48
 
49 49
 ////	COMMON
50 50
 
51
+/**
52
+ * @param string $type
53
+ */
51 54
 function ajaxSqlProgress($persistence, $sql, $type) {
52 55
 	global $mod_strings;
53 56
 
Please login to merge, or discard this patch.
modules/UpgradeWizard/uw_utils.php 1 patch
Doc Comments   +22 added lines, -3 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
  *
284 284
  * @param string the directory name to remove
285 285
  * @param boolean whether to just empty the given directory, without deleting the given directory.
286
- * @return boolean True/False whether the directory was deleted.
286
+ * @return boolean|null True/False whether the directory was deleted.
287 287
  */
288 288
 
289 289
 function copyRecursiveBetweenDirectories($from,$to){
@@ -1176,6 +1176,7 @@  discard block
 block discarded – undo
1176 1176
 
1177 1177
 /**
1178 1178
  * is a file that we blow away automagically
1179
+ * @param string $file
1179 1180
  */
1180 1181
 function isAutoOverwriteFile($file) {
1181 1182
 	$overwriteDirs = array(
@@ -1811,6 +1812,9 @@  discard block
 block discarded – undo
1811 1812
 	return $errors;
1812 1813
 }
1813 1814
 
1815
+/**
1816
+ * @param string $file_path
1817
+ */
1814 1818
 function fileCopy($file_path){
1815 1819
 	if(file_exists(clean_path($_SESSION['unzip_dir'].'/'.$_SESSION['zip_from_dir'].'/'.$file_path))) {
1816 1820
 		$file = clean_path($_SESSION['unzip_dir'].'/'.$_SESSION['zip_from_dir'].'/'.$file_path);
@@ -1930,6 +1934,9 @@  discard block
 block discarded – undo
1930 1934
 }
1931 1935
 
1932 1936
 if ( !function_exists('extractFile') ) {
1937
+/**
1938
+ * @return string
1939
+ */
1933 1940
 function extractFile($zip_file, $file_in_zip) {
1934 1941
     global $base_tmp_upgrade_dir;
1935 1942
 
@@ -1947,6 +1954,9 @@  discard block
 block discarded – undo
1947 1954
 }
1948 1955
 
1949 1956
 if ( !function_exists('extractManifest') ) {
1957
+/**
1958
+ * @return string
1959
+ */
1950 1960
 function extractManifest($zip_file) {
1951 1961
 	logThis('extracting manifest.');
1952 1962
     return(extractFile($zip_file, "manifest.php"));
@@ -2027,7 +2037,7 @@  discard block
 block discarded – undo
2027 2037
 /**
2028 2038
  * Verifies a manifest from a patch or module to be compatible with the current Sugar version and flavor
2029 2039
  * @param array manifest Standard manifest array
2030
- * @return string Error message, blank on success
2040
+ * @return null|boolean Error message, blank on success
2031 2041
  */
2032 2042
 function validate_manifest($manifest) {
2033 2043
 	logThis('validating manifest.php file');
@@ -2548,6 +2558,9 @@  discard block
 block discarded – undo
2548 2558
     }
2549 2559
 }
2550 2560
 
2561
+/**
2562
+ * @param boolean $disable
2563
+ */
2551 2564
 function handleExecuteSqlKeys($db, $tableName, $disable)
2552 2565
 {
2553 2566
     if(empty($tableName)) return true;
@@ -2659,6 +2672,9 @@  discard block
 block discarded – undo
2659 2672
 }
2660 2673
 
2661 2674
 
2675
+/**
2676
+ * @param string $query
2677
+ */
2662 2678
 function getAlterTable($query){
2663 2679
 	$query = strtolower($query);
2664 2680
 	if (preg_match('/^\s*alter\s+table\s+/', $query)) {
@@ -2877,6 +2893,9 @@  discard block
 block discarded – undo
2877 2893
 	return $currState;
2878 2894
 }
2879 2895
 
2896
+/**
2897
+ * @param string $step
2898
+ */
2880 2899
 function didThisStepRunBefore($step,$SubStep=''){
2881 2900
 	if($step == null) return;
2882 2901
 	$upgrade_progress_dir = sugar_cached('upgrades/temp');
@@ -3249,7 +3268,7 @@  discard block
 block discarded – undo
3249 3268
  * to have the value of the $column_name parameter
3250 3269
  *
3251 3270
  * @param $bean SugarBean which we are adding team_set_id column to
3252
- * @param $column_name The name of the column containing the default team_set_id value
3271
+ * @param string $column_name The name of the column containing the default team_set_id value
3253 3272
  */
3254 3273
 function upgradeTeamColumn($bean, $column_name) {
3255 3274
 	//first let's check to ensure that the team_set_id field is defined, if not it could be the case that this is an older
Please login to merge, or discard this patch.
modules/UserPreferences/UserPreference.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      * Loads preference by category from database. Saving will be done in utils.php -> sugar_cleanup
186 186
      *
187 187
      * @param string $category name of the category to retreive, defaults to global scope
188
-     * @return bool successful?
188
+     * @return null|boolean successful?
189 189
      */
190 190
     public function loadPreferences(
191 191
         $category = 'global'
@@ -291,7 +291,6 @@  discard block
 block discarded – undo
291 291
      * sugar_cleanup if a setPreference has been called during one round trip.
292 292
      *
293 293
      * @global user will use current_user if no user specificed in $user param
294
-     * @param user $user User object to retrieve, otherwise user current_user
295 294
      * @param bool $all save all of the preferences? (Dangerous)
296 295
      *
297 296
      */
@@ -387,6 +386,7 @@  discard block
 block discarded – undo
387 386
     /**
388 387
      * Updates every user pref with a new key value supports 2 levels deep, use append to
389 388
      * array if you want to append the value to an array
389
+     * @param string $key
390 390
      */
391 391
     public static function updateAllUserPrefs(
392 392
         $key,
Please login to merge, or discard this patch.
modules/Users/authentication/AuthenticationController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
 	 * This is called on every page hit.
188 188
 	 * It returns true if the current session is authenticated or false otherwise
189 189
 	 *
190
-	 * @return booelan
190
+	 * @return boolean
191 191
 	 */
192 192
 	public function sessionAuthenticate()
193 193
 	{
Please login to merge, or discard this patch.
modules/Users/authentication/EmailAuthenticate/EmailAuthenticateUser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     /**
104 104
      * Sends the users password to the email address or sends
105 105
      *
106
-     * @param unknown_type $user_id
106
+     * @param string $user_id
107 107
      * @param unknown_type $password
108 108
      */
109 109
     function sendEmailPassword($user_id, $password){
Please login to merge, or discard this patch.
modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
 	/**
241 241
 	 * takes in a name and creates the appropriate search filter for that user name including any additional filters specified in the system settings page
242
-	 * @param $name
242
+	 * @param string $name
243 243
 	 * @return String
244 244
 	 */
245 245
 	function getUserNameFilter($name){
@@ -339,6 +339,7 @@  discard block
 block discarded – undo
339 339
 	 /**
340 340
     * @return string appropriate value for username when binding to directory server.
341 341
     * @param string $user_name the value provided in login form
342
+    * @param string $password
342 343
     * @desc Take the login username and return either said username for AD or lookup
343 344
      * distinguished name using anonymous credentials for OpenLDAP.
344 345
      * Contributions by Erik Mitchell [email protected]
Please login to merge, or discard this patch.
Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * Generate the request.
51 51
      *
52 52
      * @return
53
-     *   A fully qualified URL that can be redirected to in order to process
53
+     string   A fully qualified URL that can be redirected to in order to process
54 54
      *   the authorization request.
55 55
      */
56 56
     public function create() {
@@ -76,6 +76,9 @@  discard block
 block discarded – undo
76 76
       }
77 77
     }
78 78
 
79
+    /**
80
+     * @param integer $length
81
+     */
79 82
     private function generateUniqueID($length) {
80 83
       $chars = "abcdef0123456789";
81 84
       $chars_len = strlen($chars);
Please login to merge, or discard this patch.
modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/xmlsec.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * Determine if the document passes the security test.
62 62
      *
63 63
      * @return
64
-     *   TRUE if the document passes. This could throw a generic Exception
64
+     boolean   TRUE if the document passes. This could throw a generic Exception
65 65
      *   if the document or key cannot be found.
66 66
      */
67 67
     
Please login to merge, or discard this patch.