Completed
Pull Request — 1.11.x (#1466)
by José
37:03
created
src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     /**
95 95
      * @param array $templates
96 96
      *
97
-     * @return null
97
+     * @return null|string
98 98
      */
99 99
     public function formatTemplates($templates)
100 100
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function createHtmlStyle()
56 56
     {
57 57
         $style = '';
58
-        if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '' ) {
58
+        if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '') {
59 59
             $cssFile = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/editor.css';
60 60
             if (!is_file($cssFile)) {
61 61
                 $cssFile = api_get_path(WEB_CSS_PATH).'editor.css';
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
         return [[
148 148
             'title' => get_lang('EmptyTemplate'),
149 149
             'description' => null,
150
-            'image' => api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/empty.gif',
150
+            'image' => api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/empty.gif',
151 151
             'html' => '
152 152
                 <!DOCYTPE html>
153 153
                 <html>
154 154
                     <head>
155
-                        <meta charset="' . api_get_system_encoding() . '" />
155
+                        <meta charset="' . api_get_system_encoding().'" />
156 156
                     </head>
157
-                    <body  dir="' . api_get_text_direction() . '">
157
+                    <body  dir="' . api_get_text_direction().'">
158 158
                         <p>
159 159
                             <br/>
160 160
                         </p>
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $search = array('{CSS}', '{IMG_DIR}', '{REL_PATH}', '{COURSE_DIR}');
178 178
         $replace = array(
179 179
             '',
180
-            api_get_path(REL_CODE_PATH) . 'img/',
180
+            api_get_path(REL_CODE_PATH).'img/',
181 181
             api_get_path(REL_PATH),
182 182
             api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH),
183 183
             api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH)
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         foreach ($systemTemplates as $template) {
189 189
             $image = $template->getImage();
190 190
             $image = !empty($image) ? $image : 'empty.gif';
191
-            $image = api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/' . $image;
191
+            $image = api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/'.$image;
192 192
 
193 193
             /*$image = $this->urlGenerator->generate(
194 194
                 'get_document_template_action',
@@ -240,12 +240,12 @@  discard block
 block discarded – undo
240 240
             $templateItem['image'] = api_get_path(WEB_APP_PATH)
241 241
                 . 'home/default_platform_document/template_thumb/noimage.gif';
242 242
             $templateItem['html'] = file_get_contents(api_get_path(SYS_COURSE_PATH)
243
-                . $courseDirectory . '/document' . $templateData['path']);
243
+                . $courseDirectory.'/document'.$templateData['path']);
244 244
 
245 245
             $image = $template->getImage();
246 246
             if (!empty($image)) {
247 247
                 $templateItem['image'] = api_get_path(WEB_COURSE_PATH)
248
-                    . $courseDirectory . '/upload/template_thumbnails/' . $template->getImage();
248
+                    . $courseDirectory.'/upload/template_thumbnails/'.$template->getImage();
249 249
             }
250 250
 
251 251
             $templateList[] = $templateItem;
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Connector.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
     /**
86 86
      * Available driver list.
87
-     * @return array
87
+     * @return string[]
88 88
      */
89 89
     private function getDefaultDriverList()
90 90
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             'root_sys' => api_get_path(SYS_PATH),
52 52
             'sys_root' => api_get_path(SYS_PATH), // just an alias
53 53
             'sys_course_path' => api_get_path(SYS_COURSE_PATH),
54
-         //   'sys_config_path' => $app['path.config'],
54
+            //   'sys_config_path' => $app['path.config'],
55 55
             'path.temp' => api_get_path(SYS_ARCHIVE_PATH),
56 56
             //'sys_log_path' => $app['path.logs']
57 57
         );
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
      **/
326 326
     public function access($attr, $path, $data, $volume)
327 327
     {
328
-    	return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
329
-    		? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
330
-    		:  null;                                    // else elFinder decide it itself
328
+        return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
329
+            ? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
330
+            :  null;                                    // else elFinder decide it itself
331 331
     }
332 332
 
333 333
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@
 block discarded – undo
327 327
     {
328 328
     	return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
329 329
     		? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
330
-    		:  null;                                    // else elFinder decide it itself
330
+    		:  null; // else elFinder decide it itself
331 331
     }
332 332
 
333 333
     /**
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     /**
134 134
      * Close connection
135 135
      *
136
-     * @return void
136
+     * @return boolean
137 137
      * @author Dmitry (dio) Levashov
138 138
      **/
139 139
     public function umount() {
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      * Close opened file
489 489
      *
490 490
      * @param  resource  $fp  file pointer
491
-     * @return bool
491
+     * @return boolean|null
492 492
      * @author Dmitry (dio) Levashov
493 493
      **/
494 494
     protected function _fclose($fp, $path='') {
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
      *
506 506
      * @param  string  $path  parent dir path
507 507
      * @param string  $name  new directory name
508
-     * @return string|bool
508
+     * @return string|false
509 509
      * @author Dmitry (dio) Levashov
510 510
      **/
511 511
     protected function _mkdir($path, $name) {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -633,8 +633,8 @@
 block discarded – undo
633 633
     }
634 634
 
635 635
     /**
636
-    * {@inheritdoc}
637
-    */
636
+     * {@inheritdoc}
637
+     */
638 638
     protected function _archive($dir, $files, $name, $arc) {
639 639
         return false;
640 640
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      * @return resource|false
465 465
      * @author Dmitry (dio) Levashov
466 466
      **/
467
-    protected function _fopen($path, $mode='rb') {
467
+    protected function _fopen($path, $mode = 'rb') {
468 468
         $fp = $this->tmbPath
469 469
             ? @fopen($this->tmpname($path), 'w+')
470 470
             : @tmpfile();
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
      * @return bool
492 492
      * @author Dmitry (dio) Levashov
493 493
      **/
494
-    protected function _fclose($fp, $path='') {
494
+    protected function _fclose($fp, $path = '') {
495 495
         @fclose($fp);
496 496
         if ($path) {
497 497
             @unlink($this->tmpname($path));
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/BranchSync.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -532,7 +532,6 @@  discard block
 block discarded – undo
532 532
      /**
533 533
      * Set sslPubKey
534 534
      *
535
-     * @param string $sslPubKey
536 535
      * @return BranchSync
537 536
      */
538 537
     public function setBranchType($branchType)
@@ -714,7 +713,7 @@  discard block
 block discarded – undo
714 713
     }
715 714
 
716 715
     /**
717
-     * @return mixed
716
+     * @return null|BranchSync
718 717
      */
719 718
     public function getParent()
720 719
     {
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
      */
137 137
     private $lastSyncType;
138 138
 
139
-     /**
140
-     * @var string
141
-     *
142
-     * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false)
143
-     */
139
+        /**
140
+         * @var string
141
+         *
142
+         * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false)
143
+         */
144 144
     private $sslPubKey;
145 145
 
146 146
     /**
@@ -529,12 +529,12 @@  discard block
 block discarded – undo
529 529
         return $this->sslPubKey;
530 530
     }
531 531
 
532
-     /**
533
-     * Set sslPubKey
534
-     *
535
-     * @param string $sslPubKey
536
-     * @return BranchSync
537
-     */
532
+        /**
533
+         * Set sslPubKey
534
+         *
535
+         * @param string $sslPubKey
536
+         * @return BranchSync
537
+         */
538 538
     public function setBranchType($branchType)
539 539
     {
540 540
         $this->branchType = $branchType;
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/CourseRelUser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
     }
140 140
 
141 141
     /**
142
-     * @param $user
142
+     * @param User $user
143 143
      * @return $this
144 144
      */
145 145
     public function setUser($user)
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Repository/ItemPropertyRepository.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
      * @param $tool learnpath | document | etc
23 23
      * @param $itemId
24 24
      * @param Course $course
25
-     * @param int $sessionId
26
-     * @param int $groupId
25
+     * @param int $session
26
+     * @param int $group
27 27
      *
28 28
      * @return \Doctrine\ORM\QueryBuilder
29 29
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
                     $users = \GroupManager::getStudentsAndTutors($groupId);
197 197
                     $newUserList = array();
198 198
                     if (!empty($users)) {
199
-                        foreach($users as $user) {
199
+                        foreach ($users as $user) {
200 200
                             $newUserList[] = $user['user_id'];
201 201
                         }
202 202
                         $this->unsubcribeUsersToItem(
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/SequenceResource.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     /**
61
-     * @return string
61
+     * @return integer
62 62
      */
63 63
     public function getType()
64 64
     {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     }
124 124
 
125 125
     /**
126
-     * @param mixed $sequence
126
+     * @param Sequence $sequence
127 127
      * @return $this
128 128
      */
129 129
     public function setSequence(Sequence $sequence)
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/SessionCategory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      * Set url
67 67
      *
68 68
      * @param $url
69
-     * @return AccessUrlRelCourse
69
+     * @return SessionCategory
70 70
      */
71 71
     public function setUrl($url)
72 72
     {
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Entity/CToolIntro.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     /**
95 95
      * Get id
96 96
      *
97
-     * @return string
97
+     * @return integer
98 98
      */
99 99
     public function getId()
100 100
     {
Please login to merge, or discard this patch.