Completed
Push — master ( f173a6...4a27fe )
by Angel Fernando Quiroz
37:49 queued 04:39
created
src/Chamilo/CoreBundle/Component/Editor/Finder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->time  = $this->utime();
32 32
         $this->debug = (isset($opts['debug']) && $opts['debug'] ? true : false);
33 33
         $this->timeout = (isset($opts['timeout']) ? $opts['timeout'] : 0);
34
-        $this->netVolumesSessionKey = !empty($opts['netVolumesSessionKey'])? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes';
34
+        $this->netVolumesSessionKey = !empty($opts['netVolumesSessionKey']) ? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes';
35 35
         $this->callbackWindowURL = (isset($opts['callbackWindowURL']) ? $opts['callbackWindowURL'] : '');
36 36
 
37 37
         // setlocale and global locale regists to elFinder::locale
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
             $_reqCmd = isset($_req['cmd']) ? $_req['cmd'] : '';
47 47
             foreach ($opts['bind'] as $cmd => $handlers) {
48 48
                 $doRegist = (strpos($cmd, '*') !== false);
49
-                if (! $doRegist) {
49
+                if (!$doRegist) {
50 50
                     $_getcmd = create_function('$cmd', 'list($ret) = explode(\'.\', $cmd);return trim($ret);');
51 51
                     $doRegist = ($_reqCmd && in_array($_reqCmd, array_map($_getcmd, explode(' ', $cmd))));
52 52
                 }
53 53
                 if ($doRegist) {
54
-                    if (! is_array($handlers) || is_object($handlers[0])) {
54
+                    if (!is_array($handlers) || is_object($handlers[0])) {
55 55
                         $handlers = array($handlers);
56 56
                     }
57
-                    foreach($handlers as $handler) {
57
+                    foreach ($handlers as $handler) {
58 58
                         if ($handler) {
59 59
                             if (is_string($handler) && strpos($handler, '.')) {
60 60
                                 list($_domain, $_name, $_method) = array_pad(explode('.', $handler), 3, '');
61 61
                                 if (strcasecmp($_domain, 'plugin') === 0) {
62
-                                    if ($plugin = $this->getPluginInstance($_name, isset($opts['plugin'][$_name])? $opts['plugin'][$_name] : array())
62
+                                    if ($plugin = $this->getPluginInstance($_name, isset($opts['plugin'][$_name]) ? $opts['plugin'][$_name] : array())
63 63
                                         and method_exists($plugin, $_method)) {
64 64
                                         $this->bind($cmd, array($plugin, $_method));
65 65
                                     }
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Controller/Home/HomeController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             $list = CourseHome::get_tools_category(TOOL_INTERACTION);
168 168
             $list2 = CourseHome::get_tools_category(TOOL_COURSE_PLUGIN);
169 169
             $list = array_merge($list, $list2);
170
-            $result =  CourseHome::show_tools_category($urlGenerator, $list);
170
+            $result = CourseHome::show_tools_category($urlGenerator, $list);
171 171
             $totalList = array_merge($totalList, $result['tool_list']);
172 172
 
173 173
             $content .= $this->return_block(get_lang('Interaction'), $result['content']);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $content .= $this->return_block(get_lang('Administration'), $result['content']);
181 181
 
182 182
         } elseif (api_is_coach()) {
183
-            $content .=  '<div class="row">';
183
+            $content .= '<div class="row">';
184 184
             $list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
185 185
             $result = CourseHome::show_tools_category($urlGenerator, $list);
186 186
             $content .= $result['content'];
@@ -252,13 +252,13 @@  discard block
 block discarded – undo
252 252
                 $course_id = api_get_course_int_id();
253 253
                 $condition = '';
254 254
                 if (!empty($session_id)) {
255
-                    $condition =  api_get_session_condition($session_id);
255
+                    $condition = api_get_session_condition($session_id);
256 256
                     $sql = "SELECT iid FROM $table
257 257
                             WHERE c_id = $course_id AND autolaunch = 1 $condition
258 258
                             LIMIT 1";
259 259
                     $result = \Database::query($sql);
260 260
                     //If we found nothing in the session we just called the session_id =  0 autolaunch
261
-                    if (\Database::num_rows($result) ==  0) {
261
+                    if (\Database::num_rows($result) == 0) {
262 262
                         $condition = '';
263 263
                     } else {
264 264
                         //great, there is an specific auto lunch for this session we leave the $condition
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
                         WHERE c_id = $course_id AND autolaunch = 1 $condition
270 270
                         LIMIT 1";
271 271
                 $result = \Database::query($sql);
272
-                if (\Database::num_rows($result) >  0) {
272
+                if (\Database::num_rows($result) > 0) {
273 273
                     $data = \Database::fetch_array($result, 'ASSOC');
274 274
                     if (!empty($data['iid'])) {
275 275
                         if (api_is_platform_admin() || api_is_allowed_to_edit()) {
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
                 $course_id = api_get_course_int_id();
315 315
                 $condition = '';
316 316
                 if (!empty($session_id)) {
317
-                    $condition =  api_get_session_condition($session_id);
317
+                    $condition = api_get_session_condition($session_id);
318 318
                     $sql = "SELECT id FROM $lp_table WHERE c_id = $course_id AND autolunch = 1 $condition LIMIT 1";
319 319
                     $result = \Database::query($sql);
320 320
                     //If we found nothing in the session we just called the session_id =  0 autolunch
321
-                    if (\Database::num_rows($result) ==  0) {
321
+                    if (\Database::num_rows($result) == 0) {
322 322
                         $condition = '';
323 323
                     } else {
324 324
                         //great, there is an specific auto lunch for this session we leave the $condition
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                         WHERE c_id = $course_id AND autolunch = 1 $condition
330 330
                         LIMIT 1";
331 331
                 $result = \Database::query($sql);
332
-                if (\Database::num_rows($result) >  0) {
332
+                if (\Database::num_rows($result) > 0) {
333 333
                     $lp_data = \Database::fetch_array($result, 'ASSOC');
334 334
                     if (!empty($lp_data['id'])) {
335 335
                         if (api_is_platform_admin() || api_is_allowed_to_edit()) {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/QuestionScoreNameType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             'entity',
21 21
             array(
22 22
                 'class' => 'Entity\QuestionScore',
23
-                'query_builder' => function ($repository) {
23
+                'query_builder' => function($repository) {
24 24
                     return $repository->createQueryBuilder('p')
25 25
                         ->orderBy('p.id', 'ASC');
26 26
                 },
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/JuryType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                 'class' => 'Entity\BranchSync',
38 38
                 'property' => 'branchName',
39 39
                 'query_builder' =>
40
-                    function (EntityRepository $er) {
40
+                    function(EntityRepository $er) {
41 41
                         return $er->createQueryBuilder('u')
42 42
                             //->where('u.role LIKE :role')
43 43
                             //->setParameter(':role', 'ROLE_JURY%')
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/SessionTreeType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 'class' => 'Entity\SessionPath',
30 30
                 'property' => 'name',
31 31
                 'query_builder' =>
32
-                    function (EntityRepository $er) {
32
+                    function(EntityRepository $er) {
33 33
                         return $er->createQueryBuilder('u')
34 34
                             ->orderBy('u.name', 'DESC');
35 35
                     },
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 'class' => 'Entity\Tool',
45 45
                 'property' => 'name',
46 46
                 'query_builder' =>
47
-                    function (EntityRepository $er) {
47
+                    function(EntityRepository $er) {
48 48
                         return $er->createQueryBuilder('u')
49 49
                             ->orderBy('u.name', 'DESC');
50 50
                     },
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 'class' => 'Entity\Tool',
59 59
                 'property' => 'name',
60 60
                 'query_builder' =>
61
-                    function (EntityRepository $er) {
61
+                    function(EntityRepository $er) {
62 62
                         return $er->createQueryBuilder('u')
63 63
                             ->orderBy('u.name', 'DESC');
64 64
                     },
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 'class' => 'Entity\Session',
73 73
                 'property' => 'name',
74 74
                 'query_builder' =>
75
-                    function (EntityRepository $er) {
75
+                    function(EntityRepository $er) {
76 76
                         return $er->createQueryBuilder('u')
77 77
                             ->orderBy('u.name', 'DESC');
78 78
                     },
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 'class' => 'Entity\Course',
87 87
                 'property' => 'title',
88 88
                 'query_builder' =>
89
-                    function (EntityRepository $er) {
89
+                    function(EntityRepository $er) {
90 90
                         return $er->createQueryBuilder('u')
91 91
                             ->orderBy('u.title', 'DESC');
92 92
                     },
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/CurriculumItemType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             'entity',
28 28
             array(
29 29
                 'class' => 'Entity\CurriculumCategory',
30
-                'query_builder' => function ($repository) {
30
+                'query_builder' => function($repository) {
31 31
                     return $repository->createQueryBuilder('p')
32 32
                         ->orderBy('p.title', 'ASC');
33 33
                 },
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/JuryMembersType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                 'class' => 'Entity\Role',
22 22
                 'property' => 'name',
23 23
                 'query_builder' =>
24
-                    function (EntityRepository $er) {
24
+                    function(EntityRepository $er) {
25 25
                         return $er->createQueryBuilder('u')
26 26
                             ->where('u.role LIKE :role')
27 27
                             ->setParameter(':role', 'ROLE_JURY%')
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         // Fixes issue with the ajax select, waiting this workaround until symfony add ajax search into the core
40 40
         $builder->addEventListener(
41 41
             FormEvents::PRE_SUBMIT,
42
-            function ($event) use ($factory, $builder) {
42
+            function($event) use ($factory, $builder) {
43 43
                 $form = $event->getForm();
44 44
                 $case = $event->getData();
45 45
                 $id = $case['user_id'][0];
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Form/CurriculumCategoryType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             'entity',
32 32
             array(
33 33
                 'class' => 'Entity\CurriculumCategory',
34
-                'query_builder' => function ($repository) use (
34
+                'query_builder' => function($repository) use (
35 35
                     $entity,
36 36
                     $course,
37 37
                     $session
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Resource/ResourceLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
      */
145 145
     public function __toString()
146 146
     {
147
-        return (string)$this->getId();
147
+        return (string) $this->getId();
148 148
     }
149 149
 
150 150
     /**
Please login to merge, or discard this patch.