Completed
Push — master ( f173a6...4a27fe )
by Angel Fernando Quiroz
37:49 queued 04:39
created
src/Chamilo/CoreBundle/Entity/ExtraField.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  *
16 16
  * @ORM\MappedSuperclass
17 17
  */
18
- class ExtraField// extends BaseAttribute
18
+    class ExtraField// extends BaseAttribute
19 19
 {
20 20
     const USER_FIELD_TYPE = 1;
21 21
     const COURSE_FIELD_TYPE = 2;
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
         return $this;
264 264
     }
265 265
 
266
-     /**
267
-     * @return boolean
268
-     */
266
+        /**
267
+         * @return boolean
268
+         */
269 269
     public function isChangeable()
270 270
     {
271 271
         return $this->changeable;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
  * @ORM\MappedSuperclass
17 17
  */
18 18
  class ExtraField// extends BaseAttribute
19
-{
19
+ {
20 20
     const USER_FIELD_TYPE = 1;
21 21
     const COURSE_FIELD_TYPE = 2;
22 22
     const SESSION_FIELD_TYPE = 3;
Please login to merge, or discard this patch.
main/gradebook/lib/user_data_generator.class.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
     /**
287 287
      * @param $item
288
-     * @param $ignore_score_color
288
+     * @param boolean $ignore_score_color
289 289
      * @return string
290 290
      */
291 291
     private function build_average_column($item, $ignore_score_color)
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
     /**
308 308
      * @param $item
309
-     * @param $ignore_score_color
309
+     * @param boolean $ignore_score_color
310 310
      * @return string
311 311
      */
312 312
     private function build_result_column($item, $ignore_score_color)
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
     /**
325 325
      * @param $item
326
-     * @param $ignore_score_color
326
+     * @param boolean $ignore_score_color
327 327
      * @return string
328 328
      */
329 329
     private function build_mask_column($item, $ignore_score_color)
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
     /**
341 341
      * @param $coursecode
342
-     * @return mixed
342
+     * @return string
343 343
      */
344 344
     private function get_course_name_from_code_cached($coursecode)
345 345
     {
Please login to merge, or discard this patch.
src/Chamilo/SettingsBundle/Manager/SettingsManager.php 3 patches
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     /**
127 127
      * Get variables and categories as in 1.11.x
128
-     * @return array
128
+     * @return string
129 129
      */
130 130
     public function getVariablesAndCategories()
131 131
     {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
     /**
429 429
      * Rename old variable with variable used in Chamilo 2.0
430 430
      * @param string $variable
431
-     * @return mixed
431
+     * @return string
432 432
      */
433 433
     public function renameVariable($variable)
434 434
     {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      * Replace old Chamilo 1.x category with 2.0 version
465 465
      * @param string $variable
466 466
      * @param string $defaultCategory
467
-     * @return mixed
467
+     * @return string
468 468
      */
469 469
     public function fixCategory($variable, $defaultCategory)
470 470
     {
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
     }
559 559
 
560 560
     /**
561
-     * @param $name
562
-     * @return mixed
561
+     * @param string $name
562
+     * @return string
563 563
      * @throws \InvalidArgumentException
564 564
      */
565 565
     public function getSetting($name)
@@ -843,6 +843,9 @@  discard block
 block discarded – undo
843 843
         return $parameters;
844 844
     }
845 845
 
846
+    /**
847
+     * @param string $namespace
848
+     */
846 849
     public function getParametersFromKeyword($namespace, $keyword = '')
847 850
     {
848 851
         $criteria = array('category' => $namespace);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             'Institution' => 'Platform',
142 142
             'InstitutionUrl' => 'Platform',
143 143
             'siteName' => 'Platform',
144
-            'emailAdministrator' => 'admin',//'emailAdministrator' => 'Platform',
144
+            'emailAdministrator' => 'admin', //'emailAdministrator' => 'Platform',
145 145
             'administratorSurname' => 'admin',
146 146
             'administratorTelephone' => 'admin',
147 147
             'administratorName' => 'admin',
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
             'allow_send_message_to_all_platform_users' => 'Tools',
253 253
             'message_max_upload_filesize' => 'Tools',
254 254
             'use_users_timezone' => 'profile', //'use_users_timezone' => 'Timezones',
255
-            'timezone_value' => 'platform',//'timezone_value' => 'Timezones',
255
+            'timezone_value' => 'platform', //'timezone_value' => 'Timezones',
256 256
             'allow_user_course_subscription_by_course_admin' => 'Security',
257 257
             'show_link_bug_notification' => 'Platform',
258 258
             'show_link_ticket_notification' => 'Platform',
259
-            'course_validation' => 'course',//'course_validation' => 'Platform',
259
+            'course_validation' => 'course', //'course_validation' => 'Platform',
260 260
             'course_validation_terms_and_conditions_url' => 'Platform',
261 261
             'sso_authentication' => 'Security',
262 262
             'sso_authentication_domain' => 'Security',
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -686,7 +686,7 @@
 block discarded – undo
686 686
             $settings->setSchemaAlias($schemaAlias);
687 687
         }
688 688
 
689
-         // We need to get a plain parameters array since we use the options resolver on it
689
+            // We need to get a plain parameters array since we use the options resolver on it
690 690
         //$parameters = $settings->getParameters();
691 691
         $parameters = $this->getParameters($schemaAliasNoPrefix);
692 692
 
Please login to merge, or discard this patch.
main/inc/lib/fileManage.lib.php 3 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -132,38 +132,38 @@  discard block
 block discarded – undo
132 132
  */
133 133
 function my_rename($file_path, $new_file_name) {
134 134
 
135
-	$save_dir = getcwd();
136
-	$path = dirname($file_path);
137
-	$old_file_name = basename($file_path);
138
-	$new_file_name = api_replace_dangerous_char($new_file_name);
135
+    $save_dir = getcwd();
136
+    $path = dirname($file_path);
137
+    $old_file_name = basename($file_path);
138
+    $new_file_name = api_replace_dangerous_char($new_file_name);
139 139
 
140
-	// If no extension, take the old one
141
-	if ((strpos($new_file_name, '.') === false) && ($dotpos = strrpos($old_file_name, '.'))) {
142
-		$new_file_name .= substr($old_file_name, $dotpos);
143
-	}
140
+    // If no extension, take the old one
141
+    if ((strpos($new_file_name, '.') === false) && ($dotpos = strrpos($old_file_name, '.'))) {
142
+        $new_file_name .= substr($old_file_name, $dotpos);
143
+    }
144 144
 
145
-	// Note: still possible: 'xx.yy' -rename-> '.yy' -rename-> 'zz'
146
-	// This is useful for folder names, where otherwise '.' would be sticky
145
+    // Note: still possible: 'xx.yy' -rename-> '.yy' -rename-> 'zz'
146
+    // This is useful for folder names, where otherwise '.' would be sticky
147 147
 
148
-	// Extension PHP is not allowed, change to PHPS
149
-	$new_file_name = php2phps($new_file_name);
148
+    // Extension PHP is not allowed, change to PHPS
149
+    $new_file_name = php2phps($new_file_name);
150 150
 
151
-	if ($new_file_name == $old_file_name) {
152
-		return $old_file_name;
153
-	}
151
+    if ($new_file_name == $old_file_name) {
152
+        return $old_file_name;
153
+    }
154 154
 
155
-	if (strtolower($new_file_name) != strtolower($old_file_name) && check_name_exist($path.'/'.$new_file_name)) {
156
-		return false;
157
-	}
158
-	// On a Windows server, it would be better not to do the above check
159
-	// because it succeeds for some new names resembling the old name.
160
-	// But on Unix/Linux the check must be done because rename overwrites.
155
+    if (strtolower($new_file_name) != strtolower($old_file_name) && check_name_exist($path.'/'.$new_file_name)) {
156
+        return false;
157
+    }
158
+    // On a Windows server, it would be better not to do the above check
159
+    // because it succeeds for some new names resembling the old name.
160
+    // But on Unix/Linux the check must be done because rename overwrites.
161 161
 
162
-	chdir($path);
163
-	$res = rename($old_file_name, $new_file_name) ? $new_file_name : false;
164
-	chdir($save_dir);
162
+    chdir($path);
163
+    $res = rename($old_file_name, $new_file_name) ? $new_file_name : false;
164
+    chdir($save_dir);
165 165
 
166
-	return $res;
166
+    return $res;
167 167
 }
168 168
 
169 169
 /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $file_name = basename($source);
186 186
         // move onto self illegal: mv a/b/c a/b/c or mv a/b/c a/b
187 187
         if (strcasecmp($target, dirname($source)) === 0) {
188
-               return false;
188
+                return false;
189 189
         }
190 190
         $isWindowsOS = api_is_windows_os();
191 191
         $canExec = function_exists('exec');
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
  */
266 266
 function getextension($filename)
267 267
 {
268
-	$bouts = explode('.', $filename);
269
-	return array(array_pop($bouts), implode('.', $bouts));
268
+    $bouts = explode('.', $filename);
269
+    return array(array_pop($bouts), implode('.', $bouts));
270 270
 }
271 271
 
272 272
 /**
@@ -277,17 +277,17 @@  discard block
 block discarded – undo
277 277
  * @param 	boolean $recursive if true , include subdirectory in total
278 278
  */
279 279
 function dirsize($root, $recursive = true) {
280
-	$dir = @opendir($root);
281
-	$size = 0;
282
-	while ($file = @readdir($dir)) {
283
-		if (!in_array($file, array('.', '..'))) {
284
-			if (is_dir($root.'/'.$file)) {
285
-				$size += $recursive ? dirsize($root.'/'.$file) : 0;
286
-			} else {
287
-				$size += @filesize($root.'/'.$file);
288
-			}
289
-		}
290
-	}
291
-	@closedir($dir);
292
-	return $size;
280
+    $dir = @opendir($root);
281
+    $size = 0;
282
+    while ($file = @readdir($dir)) {
283
+        if (!in_array($file, array('.', '..'))) {
284
+            if (is_dir($root.'/'.$file)) {
285
+                $size += $recursive ? dirsize($root.'/'.$file) : 0;
286
+            } else {
287
+                $size += @filesize($root.'/'.$file);
288
+            }
289
+        }
290
+    }
291
+    @closedir($dir);
292
+    return $size;
293 293
 }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
  * Deletes a file or a directory
40 40
  *
41 41
  * @author - Hugues Peeters
42
- * @param  $file (String) - the path of file or directory to delete
43
- * @return boolean - true if the delete succeed, false otherwise.
42
+ * @param  string $file (String) - the path of file or directory to delete
43
+ * @return boolean|null - true if the delete succeed, false otherwise.
44 44
  * @see    - delete() uses check_name_exist() and removeDir() functions
45 45
  */
46 46
 function my_delete($file)
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
  * @author Hugues Peeters <[email protected]>
128 128
  * @param  string $file_path complete path of the file or the directory
129 129
  * @param  string $new_file_name new name for the file or the directory
130
- * @return boolean true if succeed, false otherwise
130
+ * @return string|false true if succeed, false otherwise
131 131
  * @see rename() uses the check_name_exist() and php2phps() functions
132 132
  */
133 133
 function my_rename($file_path, $new_file_name) {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
  * @param  string $target the path of the new area
175 175
  * @param  bool $forceMove Whether to force a move or to make a copy (safer but slower) and then delete the original
176 176
  * @param	bool $moveContent In some cases (including migrations), we need to move the *content* and not the folder itself
177
- * @return bool true if the move succeed, false otherwise.
177
+ * @return boolean|null true if the move succeed, false otherwise.
178 178
  * @see move() uses check_name_exist() and copyDirTo() functions
179 179
  */
180 180
 function move($source, $target, $forceMove = true, $moveContent = false)
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,10 +46,12 @@  discard block
 block discarded – undo
46 46
 function my_delete($file)
47 47
 {
48 48
     if (check_name_exist($file)) {
49
-        if (is_file($file)) { // FILE CASE
49
+        if (is_file($file)) {
50
+// FILE CASE
50 51
             unlink($file);
51 52
             return true;
52
-        } elseif (is_dir($file)) { // DIRECTORY CASE
53
+        } elseif (is_dir($file)) {
54
+// DIRECTORY CASE
53 55
             removeDir($file);
54 56
             return true;
55 57
         }
@@ -130,7 +132,8 @@  discard block
 block discarded – undo
130 132
  * @return boolean true if succeed, false otherwise
131 133
  * @see rename() uses the check_name_exist() and php2phps() functions
132 134
  */
133
-function my_rename($file_path, $new_file_name) {
135
+function my_rename($file_path, $new_file_name)
136
+{
134 137
 
135 138
 	$save_dir = getcwd();
136 139
 	$path = dirname($file_path);
@@ -276,7 +279,8 @@  discard block
 block discarded – undo
276 279
  * @param 	string	$root path of dir to measure
277 280
  * @param 	boolean $recursive if true , include subdirectory in total
278 281
  */
279
-function dirsize($root, $recursive = true) {
282
+function dirsize($root, $recursive = true)
283
+{
280 284
 	$dir = @opendir($root);
281 285
 	$size = 0;
282 286
 	while ($file = @readdir($dir)) {
Please login to merge, or discard this patch.
src/Chamilo/SettingsBundle/Twig/SettingsExtension.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
     public function getFunctions()
32 32
     {
33 33
         return array(
34
-             new \Twig_SimpleFunction('chamilo_settings_all', array($this, 'getSettings')),
35
-             new \Twig_SimpleFunction('chamilo_settings_get', array($this, 'getSettingsParameter')),
36
-             new \Twig_SimpleFunction('chamilo_settings_has', [$this, 'hasSettingsParameter']),
34
+                new \Twig_SimpleFunction('chamilo_settings_all', array($this, 'getSettings')),
35
+                new \Twig_SimpleFunction('chamilo_settings_get', array($this, 'getSettingsParameter')),
36
+                new \Twig_SimpleFunction('chamilo_settings_has', [$this, 'hasSettingsParameter']),
37 37
         );
38 38
     }
39 39
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
     public function getFilters()
45 45
     {
46 46
         return array(
47
-             //new \Twig_SimpleFunction('chamilo_settings_all', array($this, 'getSettings')),
48
-             new \Twig_SimpleFilter('get_setting', array($this, 'getSettingsParameter')),
49
-             //new \Twig_SimpleFunction('chamilo_settings_has', [$this, 'hasSettingsParameter']),
47
+                //new \Twig_SimpleFunction('chamilo_settings_all', array($this, 'getSettings')),
48
+                new \Twig_SimpleFilter('get_setting', array($this, 'getSettingsParameter')),
49
+                //new \Twig_SimpleFunction('chamilo_settings_has', [$this, 'hasSettingsParameter']),
50 50
         );
51 51
     }
52 52
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @param string $namespace
58 58
      *
59
-     * @return array
59
+     * @return \Sylius\Bundle\SettingsBundle\Model\SettingsInterface
60 60
      */
61 61
     public function getSettings($namespace)
62 62
     {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     /**
67 67
      * @param $name
68
-     * @return mixed
68
+     * @return string
69 69
      */
70 70
     public function getSettingsParameter($name)
71 71
     {
Please login to merge, or discard this patch.
main/inc/lib/course_home.lib.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -996,7 +996,7 @@
 block discarded – undo
996 996
             }
997 997
         }
998 998
 
999
-         return array(
999
+            return array(
1000 1000
             'content' => $html,
1001 1001
             'tool_list' => $items
1002 1002
         );
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     /**
219 219
      * Displays the tools of a certain category.
220 220
      *
221
-     * @return void
221
+     * @return string
222 222
      * @param string $course_tool_category	contains the category of tools to display:
223 223
      * "Public", "PublicButHide", "courseAdmin", "claroAdmin"
224 224
      */
@@ -1014,6 +1014,7 @@  discard block
 block discarded – undo
1014 1014
      * Shows the general data for a particular meeting
1015 1015
      *
1016 1016
      * @param id	session id
1017
+     * @param integer $id_session
1017 1018
      * @return string	session data
1018 1019
      */
1019 1020
     public static function show_session_data($id_session)
@@ -1517,7 +1518,7 @@  discard block
 block discarded – undo
1517 1518
 
1518 1519
     /**
1519 1520
      * Available tools
1520
-     * @return array
1521
+     * @return string[]
1521 1522
      */
1522 1523
     public static function availableTools()
1523 1524
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1179,8 +1179,8 @@
 block discarded – undo
1179 1179
 
1180 1180
         $toolName = api_underscore_to_camel_case($toolName);
1181 1181
 
1182
-        if (isset($GLOBALS['Tool' . $toolName])) {
1183
-            return get_lang('Tool' . $toolName);
1182
+        if (isset($GLOBALS['Tool'.$toolName])) {
1183
+            return get_lang('Tool'.$toolName);
1184 1184
         }
1185 1185
 
1186 1186
         return $toolName;
Please login to merge, or discard this patch.
main/inc/lib/MoodleImport.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * Read and validate the quiz module XML
404 404
      *
405 405
      * @param resource $moduleXml XML file
406
-     * @return mixed | array if is a valid xml file, false otherwise
406
+     * @return string | array if is a valid xml file, false otherwise
407 407
      */
408 408
     public function readQuizModule($moduleXml)
409 409
     {
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
      * Fix moodle files that contains spaces
622 622
      * @param array $importedFiles
623 623
      * @param string $text
624
-     * @return mixed
624
+     * @return string
625 625
      */
626 626
     public function fixPathInText($importedFiles, &$text)
627 627
     {
@@ -642,10 +642,10 @@  discard block
 block discarded – undo
642 642
      *
643 643
      * @param array $questionList
644 644
      * @param string $questionType
645
-     * @param object $questionInstance Question/Answer instance
645
+     * @param Question $questionInstance Question/Answer instance
646 646
      * @param array $currentQuestion
647 647
      * @param array $importedFiles
648
-     * @return integer db response
648
+     * @return boolean|null db response
649 649
      */
650 650
     public function processAnswers($questionList, $questionType, $questionInstance, $currentQuestion, $importedFiles)
651 651
     {
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
     /**
801 801
      * Process Chamilo Unique Answer
802 802
      *
803
-     * @param object $objAnswer
803
+     * @param Answer $objAnswer
804 804
      * @param array $answerValues
805 805
      * @param integer $position
806 806
      * @param integer $questionWeighting
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
     /**
837 837
      * Process Chamilo True False
838 838
      *
839
-     * @param object $objAnswer
839
+     * @param Answer $objAnswer
840 840
      * @param array $answerValues
841 841
      * @param integer $position
842 842
      * @param integer $questionWeighting
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     /**
874 874
      * Process Chamilo FillBlanks
875 875
      *
876
-     * @param object $objAnswer
876
+     * @param Answer $objAnswer
877 877
      * @param array $questionType
878 878
      * @param array $answerValues
879 879
      * @param string $placeholder
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
      * Litle utility to delete the unuseful tags
1027 1027
      *
1028 1028
      * @param $array
1029
-     * @param $keys
1029
+     * @param string[] $keys
1030 1030
      */
1031 1031
     public function traverseArray(&$array, $keys)
1032 1032
     {
Please login to merge, or discard this patch.
plugin/vchamilo/lib/Virtual.php 4 patches
Doc Comments   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     * provides a side connection to a vchamilo database
185 185
     * @param array $_configuration
186 186
      *
187
-    * @return \Doctrine\DBAL\Driver\Connection
187
+    * @return string
188 188
     */
189 189
     public static function bootConnection(&$_configuration)
190 190
     {
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 
373 373
     /**
374 374
     * get a proper SQLdump command
375
-    * @param object $vchamilodata the complete new host information
375
+    * @param stdClass $vchamilodata the complete new host information
376 376
     * @return string the shell command
377 377
     */
378 378
     public static function getDatabaseDumpCmd($vchamilodata)
@@ -456,8 +456,8 @@  discard block
 block discarded – undo
456 456
 
457 457
     /**
458 458
      * Backups a database for having a snapshot.
459
-     * @param        $vchamilo    object        The Vchamilo object.
460
-     * @param        $outputfilerad    string        The output SQL file radical.
459
+     * @param        stdClass $vchamilo    object        The Vchamilo object.
460
+     * @param        string $outputfilerad    string        The output SQL file radical.
461 461
      * @return        bool    If TRUE, dumping database was a success, otherwise FALSE.
462 462
      */
463 463
     public static function backupDatabase($vchamilo, $outputfilerad)
@@ -619,6 +619,8 @@  discard block
 block discarded – undo
619 619
     * this function set will map standard moodle API calls to chamilo
620 620
     * internal primitives. This avoids too many changes to do in imported
621 621
     * code
622
+    * @param string $module
623
+    * @param string $key
622 624
     */
623 625
     public static function getConfig($module, $key, $isplugin = true)
624 626
     {
@@ -698,7 +700,7 @@  discard block
 block discarded – undo
698 700
     /**
699 701
      * @param string $path
700 702
      *
701
-     * @return mixed
703
+     * @return string
702 704
      */
703 705
     public static function chopLastSlash($path)
704 706
     {
@@ -852,7 +854,7 @@  discard block
 block discarded – undo
852 854
 
853 855
     /**
854 856
      * @param object $instance
855
-     * @return bool|\Doctrine\DBAL\Connection
857
+     * @return Doctrine\ORM\EntityManagerInterface
856 858
      */
857 859
     public static function getConnectionFromInstance($instance, $getManager = false)
858 860
     {
@@ -1297,7 +1299,7 @@  discard block
 block discarded – undo
1297 1299
     /**
1298 1300
      * @param stdClass $instance
1299 1301
      *
1300
-     * @return bool|string returns the original version of the app
1302
+     * @return string|false returns the original version of the app
1301 1303
      */
1302 1304
     public static function canBeUpgraded($instance)
1303 1305
     {
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
     }
187 187
 
188 188
     /**
189
-    * provides a side connection to a vchamilo database
190
-    * @param array $_configuration
189
+     * provides a side connection to a vchamilo database
190
+     * @param array $_configuration
191 191
      *
192
-    * @return \Doctrine\DBAL\Driver\Connection
193
-    */
192
+     * @return \Doctrine\DBAL\Driver\Connection
193
+     */
194 194
     public static function bootConnection(&$_configuration)
195 195
     {
196 196
         $dbParams = array(
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
     }
299 299
 
300 300
     /**
301
-    * drop a vchamilo instance databases using the physical connection
302
-    * @param stdClass $params
303
-    * return an array of errors or false if ok
304
-    */
301
+     * drop a vchamilo instance databases using the physical connection
302
+     * @param stdClass $params
303
+     * return an array of errors or false if ok
304
+     */
305 305
     public static function dropDatabase($params)
306 306
     {
307 307
         $params = clone $params;
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
     }
377 377
 
378 378
     /**
379
-    * get a proper SQLdump command
380
-    * @param object $vchamilodata the complete new host information
381
-    * @return string the shell command
382
-    */
379
+     * get a proper SQLdump command
380
+     * @param object $vchamilodata the complete new host information
381
+     * @return string the shell command
382
+     */
383 383
     public static function getDatabaseDumpCmd($vchamilodata)
384 384
     {
385 385
         $pgm = self::getConfig('vchamilo', 'mysql_cmd');
@@ -536,8 +536,8 @@  discard block
 block discarded – undo
536 536
     }
537 537
 
538 538
     /**
539
-    * read manifest values in vchamilo template.
540
-    */
539
+     * read manifest values in vchamilo template.
540
+     */
541 541
     public static function getVmanifest($version)
542 542
     {
543 543
         $templatewwwroot = '';
@@ -558,8 +558,8 @@  discard block
 block discarded – undo
558 558
     }
559 559
 
560 560
     /**
561
-    * make a fake vchamilo that represents the current host
562
-    */
561
+     * make a fake vchamilo that represents the current host
562
+     */
563 563
     public static function makeThis()
564 564
     {
565 565
         global $_configuration;
@@ -623,10 +623,10 @@  discard block
 block discarded – undo
623 623
     }
624 624
 
625 625
     /**
626
-    * this function set will map standard moodle API calls to chamilo
627
-    * internal primitives. This avoids too many changes to do in imported
628
-    * code
629
-    */
626
+     * this function set will map standard moodle API calls to chamilo
627
+     * internal primitives. This avoids too many changes to do in imported
628
+     * code
629
+     */
630 630
     public static function getConfig($module, $key, $isplugin = true)
631 631
     {
632 632
         if ($isplugin) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,8 @@
 block discarded – undo
173 173
         $_configuration['vchamilo_web_root'] = "{$protocol}://".@$_SERVER['HTTP_HOST'].$contentPrefix;
174 174
 
175 175
         $_configuration['vchamilo_name'] = @$_SERVER['HTTP_HOST'];
176
-        if (empty($_configuration['vchamilo_name'])) { // try again with another source if has failed
176
+        if (empty($_configuration['vchamilo_name'])) {
177
+// try again with another source if has failed
177 178
             $_configuration['vchamilo_name'] = "{$protocol}://".$_SERVER['SERVER_NAME'];
178 179
             if ($_SERVER['SERVER_PORT'] != 80) {
179 180
                 $_configuration['vchamilo_name'] .= ':'.$_SERVER['SERVER_PORT'];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 
668 668
         // get the protocol free hostname
669 669
         Display::addFlash(
670
-            Display::return_message("Copying {$templateDir}/data/courses => $coursePath")
670
+            Display::return_message("copying {$templateDir}/data/courses => $coursePath")
671 671
         );
672 672
 
673 673
         copyDirTo(
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
         );
678 678
 
679 679
         Display::addFlash(
680
-            Display::return_message("Copying {$templateDir}/data/archive => $archivePath")
680
+            Display::return_message("copying {$templateDir}/data/archive => $archivePath")
681 681
         );
682 682
 
683 683
         copyDirTo(
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
         );
688 688
 
689 689
         Display::addFlash(
690
-            Display::return_message("Copying {$templateDir}/data/home => $homePath")
690
+            Display::return_message("copying {$templateDir}/data/home => $homePath")
691 691
         );
692 692
 
693 693
         copyDirTo(
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 
699 699
         // Upload
700 700
         Display::addFlash(
701
-            Display::return_message("Copying {$templateDir}/data/upload => $uploadPath")
701
+            Display::return_message("copying {$templateDir}/data/upload => $uploadPath")
702 702
         );
703 703
 
704 704
         copyDirTo(
@@ -1029,13 +1029,13 @@  discard block
 block discarded – undo
1029 1029
         $sitename = Database::escape_string($data->sitename);
1030 1030
         $institution = Database::escape_string($data->institution);
1031 1031
 
1032
-        $sqls[] = "UPDATE {$settingstable} SET selected_value = '{$sitename}' 
1032
+        $sqls[] = "update {$settingstable} SET selected_value = '{$sitename}' 
1033 1033
                    WHERE variable = 'siteName' AND category = 'Platform' ";
1034 1034
 
1035
-        $sqls[] = "UPDATE {$settingstable} SET selected_value = '{$institution}' 
1035
+        $sqls[] = "update {$settingstable} SET selected_value = '{$institution}' 
1036 1036
                    WHERE variable = 'institution' AND category = 'Platform' ";
1037 1037
 
1038
-        $sqls[] = "UPDATE {$accessurltable} SET url = '{$data->root_web}' WHERE id = '1' ";
1038
+        $sqls[] = "update {$accessurltable} SET url = '{$data->root_web}' WHERE id = '1' ";
1039 1039
 
1040 1040
         foreach ($sqls as $sql) {
1041 1041
             Database::query($sql);
Please login to merge, or discard this patch.
plugin/google_maps/src/GoogleMapsPlugin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     /**
45 45
      * Install the plugin
46
-     * @return void
46
+     * @return boolean
47 47
      */
48 48
     public function install()
49 49
     {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     /**
54 54
      * Uninstall the plugin
55
-     * @return void
55
+     * @return boolean
56 56
      */
57 57
     public function uninstall()
58 58
     {
Please login to merge, or discard this patch.