Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
plugin/sepe/database.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 /**
9 9
  * Check if script can be called
10 10
  */
11
-if (!function_exists('api_get_path')) {
11
+if (!function_exists('api_get_path')) {
12 12
     die('This script must be loaded through the Chamilo plugin installer sequence');
13 13
 }
14 14
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 
711 711
 $queries = $pluginSchema->toSql($platform);
712 712
 
713
-foreach ($queries as $query) {
713
+foreach ($queries as $query) {
714 714
     Database::query($query);
715 715
 }
716 716
 
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
     array(6, '06', 'Experiencia docente contrastada de al menos 600 horas de impartición de acciones formativas de formación profesional para el empleo o del sistema educativo en modalidad presencial, en los últimos diez años.')
726 726
 );
727 727
 
728
-foreach ($competences as $competence) {
728
+foreach ($competences as $competence) {
729 729
     Database::insert(
730 730
         $sepeTeachingCompetenceTable,
731 731
         array(
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 $provinces = 'Albacete;Alicante/Alacant;Almería;Araba/Álava;Asturias;Ávila;Badajoz;Balears, Illes;Barcelona;Bizkaia;Burgos;Cáceres;Cádiz;Cantabria;Castellón/Castelló;Ciudad Real;Córdoba;Coruña, A;Cuenca;Gipuzkoa;Girona;Granada;Guadalajara;Huelva;Huesca;Jaén;León;Lleida;Lugo;Madrid;Málaga;Murcia;Navarra;Ourense;Palencia;Palmas, Las;Pontevedr;Rioja, La;Salamanca;Santa Cruz de Tenerife;Segovia;Sevilla;Soria;Tarragona;Teruel;Toledo;Valencia/Valéncia;Valladolid;Zamora;Zaragoza;Ceuta;Melilla';
788 788
 $list_provinces = explode(';', $provinces);
789 789
 $i = 1;
790
-foreach ($list_provinces as $value) {
790
+foreach ($list_provinces as $value) {
791 791
     $sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
792 792
     Database::query($sql);
793 793
     $i++;
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 $ccaa = ';Andalucía;Aragón;Asturias, Principado de;Balears, Illes;Canarias;Cantabria;Castilla y León;Castilla - La Mancha;Cataluña;Comunitat Valenciana;Extremadura;Galicia;Madrid, Comunidad de;Murcia, Región de;Navarra, Comunidad Foral de;País Vasco;Rioja, La;Ceuta;Melilla';
802 802
 $list_ccaa = explode(';', $ccaa);
803 803
 $i = 1;
804
-foreach ($list_ccaa as $value) {
804
+foreach ($list_ccaa as $value) {
805 805
     $sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
806 806
     Database::query($sql);
807 807
     $i++;
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 //$fieldoptions = ';Albacete;Alicante/Alacant;Almería;Araba/Álava;Asturias;Ávila;Badajoz;Balears, Illes;Barcelona;Bizkaia;Burgos;Cáceres;Cádiz;Cantabria;Castellón/Castelló;Ciudad Real;Córdoba;Coruña, A;Cuenca;Gipuzkoa;Girona;Granada;Guadalajara;Huelva;Huesca;Jaén;León;Lleida;Lugo;Madrid;Málaga;Murcia;Navarra;Ourense;Palencia;Palmas, Las;Pontevedr;Rioja, La;Salamanca;Santa Cruz de Tenerife;Segovia;Sevilla;Soria;Tarragona;Teruel;Toledo;Valencia/Valéncia;Valladolid;Zamora;Zaragoza;Ceuta;Melilla';
815 815
 $field_id = UserManager::create_extra_field($fieldlabel, $fieldtype, $fieldtitle, $fielddefault);
816 816
 $i = 1;
817
-foreach ($list_provinces as $value) {
817
+foreach ($list_provinces as $value) {
818 818
     $sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
819 819
     Database::query($sql);
820 820
     $i++;
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 //$fieldoptions = ';Andalucía;Aragón;Asturias, Principado de;Balears, Illes;Canarias;Cantabria;Castilla y León;Castilla - La Mancha;Cataluña;Comunitat Valenciana;Extremadura;Galicia;Madrid, Comunidad de;Murcia, Región de;Navarra, Comunidad Foral de;País Vasco;Rioja, La;Ceuta;Melilla';
828 828
 $field_id = UserManager::create_extra_field($fieldlabel, $fieldtype, $fieldtitle, $fielddefault);
829 829
 $i = 1;
830
-foreach ($list_ccaa as $value) {
830
+foreach ($list_ccaa as $value) {
831 831
     $sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
832 832
     Database::query($sql);
833 833
     $i++;
Please login to merge, or discard this patch.
main/inc/lib/search/ChamiloIndexer.class.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -80,6 +80,10 @@
 block discarded – undo
80 80
 
81 81
     /**
82 82
      * Get the terms stored at database
83
+     * @param string $prefix
84
+     * @param string $course_code
85
+     * @param string $tool_id
86
+     * @param integer $ref_id
83 87
      * @return  array Array of terms
84 88
      */
85 89
     public function get_terms_on_db($prefix, $course_code, $tool_id, $ref_id)
Please login to merge, or discard this patch.
main/inc/lib/search/xapian/XapianIndexer.class.php 1 patch
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     /**
102 102
      * Simple getter for the db attribute
103
-     * @return  object  The db attribute
103
+     * @return  null|XapianWritableDatabase  The db attribute
104 104
      */
105 105
     public function getDb()
106 106
     {
@@ -110,6 +110,7 @@  discard block
 block discarded – undo
110 110
     /**
111 111
      * Add this chunk to the chunk array attribute
112 112
      * @param  string  Chunk of text
113
+     * @param IndexableChunk $chunk
113 114
      * @return  void
114 115
      */
115 116
     public function addChunk($chunk)
@@ -181,7 +182,7 @@  discard block
 block discarded – undo
181 182
      * Get document data on a xapian document
182 183
      *
183 184
      * @param XapianDocument $doc xapian document to push into the db
184
-     * @return mixed xapian document data or FALSE if error
185
+     * @return string xapian document data or FALSE if error
185 186
      */
186 187
     public function get_document_data($doc)
187 188
     {
Please login to merge, or discard this patch.
main/exercise/hotspot_save.inc.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     $hotspot_coordinates = api_substr($hotspot_coordinates, 0, -2);
36 36
 }
37 37
 $course_id = api_get_course_int_id();
38
-$sql = "UPDATE $TBL_ANSWER SET
38
+$sql = "update $TBL_ANSWER SET
39 39
             hotspot_coordinates = '".Database::escape_string($hotspot_coordinates)."',
40 40
             hotspot_type = '".Database::escape_string($hotspot_type)."'
41 41
         WHERE
Please login to merge, or discard this patch.
main/inc/lib/skill.visualizer.lib.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
         $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);
36 36
     }
37 37
 
38
+    /**
39
+     * @param string $class
40
+     */
38 41
     public function prepare_skill_box($skill, $position, $class)
39 42
     {
40 43
         $block_id = $skill['id'];
Please login to merge, or discard this patch.
plugin/sepe/install.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  */
7 7
 require_once __DIR__.'/config.php';
8 8
 
9
-if (!api_is_platform_admin()) {
9
+if (!api_is_platform_admin()) {
10 10
     die ('You must have admin permissions to install plugins');
11 11
 }
12 12
 
Please login to merge, or discard this patch.
plugin/sepe/src/identification-data.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@  discard block
 block discarded – undo
12 12
 $plugin = SepePlugin::create();
13 13
 $_cid = 0;
14 14
 
15
-if (api_is_platform_admin()) {
15
+if (api_is_platform_admin()) {
16 16
     $info = getInfoIdentificationData();
17 17
     $templateName = $plugin->get_lang('DataCenter');
18 18
     $interbreadcrumb[] = array("url" => "/plugin/sepe/src/sepe-administration-menu.php", "name" => $plugin->get_lang('MenuSepe'));
19 19
     $tpl = new Template($templateName);
20 20
 
21
-    if (isset($_SESSION['sepe_message_info'])) {
21
+    if (isset($_SESSION['sepe_message_info'])) {
22 22
         $tpl->assign('message_info', $_SESSION['sepe_message_info']);
23 23
         unset($_SESSION['sepe_message_info']);
24 24
     }
25
-    if (isset($_SESSION['sepe_message_error'])) {
25
+    if (isset($_SESSION['sepe_message_error'])) {
26 26
         $tpl->assign('message_error', $_SESSION['sepe_message_error']);
27 27
         unset($_SESSION['sepe_message_error']);
28 28
     }
@@ -31,6 +31,6 @@  discard block
 block discarded – undo
31 31
     $content = $tpl->fetch($listing_tpl);
32 32
     $tpl->assign('content', $content);
33 33
     $tpl->display_one_col_template();
34
-} else {
34
+} else {
35 35
     header('Location:'.api_get_path(WEB_PATH));
36 36
 }
Please login to merge, or discard this patch.
plugin/sepe/src/configuration.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@  discard block
 block discarded – undo
13 13
 $plugin = SepePlugin::create();
14 14
 $_cid = 0;
15 15
 
16
-if (api_is_platform_admin()) {
16
+if (api_is_platform_admin()) {
17 17
     $tUser = Database::get_main_table(TABLE_MAIN_USER);
18 18
     $tApi = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
19 19
     $login = 'SEPE';
20 20
     $sql = "SELECT a.api_key AS api FROM $tUser u, $tApi a WHERE u.username='".$login."' and u.user_id = a.user_id AND a.api_service = 'dokeos';";
21 21
     $result = Database::query($sql);
22
-    if (Database::num_rows($result) > 0) {
22
+    if (Database::num_rows($result) > 0) {
23 23
         $tmp = Database::fetch_assoc($result);
24 24
         $info = $tmp['api'];
25 25
         
26
-    } else {
26
+    } else {
27 27
         $info = '';
28 28
     }
29 29
     $templateName = $plugin->get_lang('Setting');
@@ -36,6 +36,6 @@  discard block
 block discarded – undo
36 36
     $content = $tpl->fetch($listing_tpl);
37 37
     $tpl->assign('content', $content);
38 38
     $tpl->display_one_col_template();
39
-} else {
39
+} else {
40 40
     header('Location:'.api_get_path(WEB_PATH));
41 41
 }
Please login to merge, or discard this patch.
main/inc/lib/image.lib.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
      */
186 186
     public function __construct($path)
187 187
     {
188
-          parent::__construct($path);
188
+            parent::__construct($path);
189 189
     }
190 190
 
191 191
     /**
Please login to merge, or discard this patch.
Braces   +17 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@  discard block
 block discarded – undo
48 48
                     0
49 49
                 );
50 50
             }
51
-        } else { // height > $width
51
+        } else {
52
+// height > $width
52 53
             if ($height >= $max_size_for_picture) {
53 54
                 // scale width
54 55
                 $new_width = round($width * ($max_size_for_picture / $height));
@@ -193,7 +194,9 @@  discard block
 block discarded – undo
193 194
      */
194 195
     public function set_image_wrapper()
195 196
     {
196
-        if ($this->debug) error_log('Image::set_image_wrapper loaded');
197
+        if ($this->debug) {
198
+            error_log('Image::set_image_wrapper loaded');
199
+        }
197 200
         try {
198 201
             if (file_exists($this->path)) {
199 202
                 $this->image = new Imagick($this->path);
@@ -202,10 +205,14 @@  discard block
 block discarded – undo
202 205
                     $this->fill_image_info(); //Fills height, width and type
203 206
                 }
204 207
             } else {
205
-                if ($this->debug) error_log('Image::image does not exist');
208
+                if ($this->debug) {
209
+                    error_log('Image::image does not exist');
210
+                }
206 211
             }
207 212
         } catch (ImagickException $e) {
208
-            if ($this->debug) error_log($e->getMessage());
213
+            if ($this->debug) {
214
+                error_log($e->getMessage());
215
+            }
209 216
         }
210 217
     }
211 218
 
@@ -218,7 +225,9 @@  discard block
 block discarded – undo
218 225
 
219 226
         if (in_array($this->type, $this->allowed_extensions)) {
220 227
             $this->image_validated = true;
221
-            if ($this->debug) error_log('image_validated true');
228
+            if ($this->debug) {
229
+                error_log('image_validated true');
230
+            }
222 231
         }
223 232
     }
224 233
 
@@ -234,7 +243,9 @@  discard block
 block discarded – undo
234 243
     //@todo implement border logic case for Imagick
235 244
     public function resize($thumbw, $thumbh, $border, $specific_size = false)
236 245
     {
237
-        if (!$this->image_validated) return false;
246
+        if (!$this->image_validated) {
247
+            return false;
248
+        }
238 249
 
239 250
         if ($specific_size) {
240 251
             $width = $thumbw;
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * @param string $file
88 88
      * @param int $compress
89
-     * @param null $convert_file_to
89
+     * @param string $convert_file_to
90 90
      * @return bool
91 91
      */
92 92
     public function send_image(
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     /**
183 183
      * ImagickWrapper constructor.
184
-     * @param $path
184
+     * @param string $path
185 185
      */
186 186
     public function __construct($path)
187 187
     {
@@ -232,6 +232,10 @@  discard block
 block discarded – undo
232 232
     }
233 233
 
234 234
     //@todo implement border logic case for Imagick
235
+
236
+    /**
237
+     * @param integer $border
238
+     */
235 239
     public function resize($thumbw, $thumbh, $border, $specific_size = false)
236 240
     {
237 241
         if (!$this->image_validated) return false;
@@ -329,7 +333,7 @@  discard block
 block discarded – undo
329 333
 
330 334
     /**
331 335
      * GDWrapper constructor.
332
-     * @param $path
336
+     * @param string $path
333 337
      */
334 338
     public function __construct($path)
335 339
     {
@@ -392,6 +396,9 @@  discard block
 block discarded – undo
392 396
         }
393 397
     }
394 398
 
399
+    /**
400
+     * @param integer $border
401
+     */
395 402
     public function resize($thumbw, $thumbh, $border, $specific_size = false)
396 403
     {
397 404
         if (!$this->image_validated) {
Please login to merge, or discard this patch.