Completed
Pull Request — 1.11.x (#1615)
by José
26:50
created
main/user/user_import.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 
16 16
 $tool_name = get_lang('ImportUsersToACourse');
17 17
 
18
-$interbreadcrumb[] = array ("url" => "user.php", "name" => get_lang("Users"));
19
-$interbreadcrumb[] = array ("url" => "#", "name" => get_lang("ImportUsersToACourse"));
18
+$interbreadcrumb[] = array("url" => "user.php", "name" => get_lang("Users"));
19
+$interbreadcrumb[] = array("url" => "#", "name" => get_lang("ImportUsersToACourse"));
20 20
 
21 21
 $form = new FormValidator('user_import', 'post', 'user_import.php');
22 22
 $form->addElement('header', $tool_name);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     if (isset($_FILES['import_file']['size']) && $_FILES['import_file']['size'] !== 0) {
43 43
         $unsubscribe_users = isset($_POST['unsubscribe_users']) ? true : false;
44 44
         //@todo : csvToArray deprecated
45
-        $users  = Import::csvToArray($_FILES['import_file']['tmp_name']);
45
+        $users = Import::csvToArray($_FILES['import_file']['tmp_name']);
46 46
         $invalid_users  = array();
47 47
         $clean_users    = array();
48 48
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                         $user_ids = array();
80 80
                         foreach ($current_user_list as $user) {
81 81
                             if (!CourseManager::is_course_teacher($user['user_id'], $course_code)) {
82
-                                $user_ids[]= $user['user_id'];
82
+                                $user_ids[] = $user['user_id'];
83 83
                             }
84 84
                         }
85 85
                         CourseManager::unsubscribe_user($user_ids, $course_code, $session_id);
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
                     if (empty($session_id)) {
93 93
                         //just to make sure
94 94
                         if (CourseManager :: is_user_subscribed_in_course($userId, $course_code)) {
95
-                            $user_to_show[]= $userInfo['complete_name'];
95
+                            $user_to_show[] = $userInfo['complete_name'];
96 96
                         }
97 97
                     } else {
98 98
                         //just to make sure
99 99
                         if (CourseManager::is_user_subscribed_in_course($userId, $course_code, true, $session_id)) {
100
-                            $user_to_show[]= $userInfo['complete_name'];
100
+                            $user_to_show[] = $userInfo['complete_name'];
101 101
                         }
102 102
                     }
103 103
                 }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 $message = get_lang('CheckUsersWithId');
106 106
                 $type = 'warning';
107 107
                 foreach ($invalid_users as $invalid_user) {
108
-                    $user_to_show[]= $invalid_user;
108
+                    $user_to_show[] = $invalid_user;
109 109
                 }
110 110
             }
111 111
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             Display::display_warning_message($message.':  <br />'.$userMessage, false);
131 131
         }
132 132
     } else {
133
-        $empty_line_msg = ($empty_line == 0) ? get_lang('ErrorsWhenImportingFile'): get_lang('ErrorsWhenImportingFile').': '.get_lang('EmptyHeaderLine');
133
+        $empty_line_msg = ($empty_line == 0) ? get_lang('ErrorsWhenImportingFile') : get_lang('ErrorsWhenImportingFile').': '.get_lang('EmptyHeaderLine');
134 134
         Display::display_error_message($empty_line_msg);
135 135
     }
136 136
 }
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Form/FormDemoModelType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 use Symfony\Component\Form\FormBuilderInterface;
12 12
 use Symfony\Component\OptionsResolver\OptionsResolverInterface;
13 13
 
14
-class FormDemoModelType extends AbstractType{
14
+class FormDemoModelType extends AbstractType {
15 15
 
16 16
     public function buildForm(FormBuilderInterface $builder, array $options)
17 17
     {
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 ->add('someChoices', 'choice', array('choices' => $choices, 'expanded' => true, 'multiple' => true))
34 34
                 ->add('username')
35 35
                 ->add('email')
36
-                ->add('termsAccepted','checkbox')
36
+                ->add('termsAccepted', 'checkbox')
37 37
                 ->add('message', 'textarea')
38 38
                 ->add('price')
39 39
                 ->add('date', 'date', array('widget' => 'single_text'))
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Event/TaskListEvent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
      *
31 31
      * @return $this
32 32
      */
33
-    public function addTask(TaskInterface $taskInterface){
34
-        $this->tasks[]  = $taskInterface;
33
+    public function addTask(TaskInterface $taskInterface) {
34
+        $this->tasks[] = $taskInterface;
35 35
         return $this;
36 36
     }
37 37
 
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Event/ThemeEvents.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,40 +19,40 @@
 block discarded – undo
19 19
     /**
20 20
      * Used to receive notification data
21 21
      */
22
-    const THEME_NOTIFICATIONS         = 'theme.notifications';
22
+    const THEME_NOTIFICATIONS = 'theme.notifications';
23 23
     /**
24 24
      * Used to receive message data
25 25
      */
26
-    const THEME_MESSAGES              = 'theme.messages';
26
+    const THEME_MESSAGES = 'theme.messages';
27 27
     /**
28 28
      * Used to receive task data
29 29
      */
30
-    const THEME_TASKS                 = 'theme.tasks';
30
+    const THEME_TASKS = 'theme.tasks';
31 31
     /**
32 32
      *
33 33
      */
34
-    const THEME_NAVBAR_USER           = 'theme.navbar_user';
34
+    const THEME_NAVBAR_USER = 'theme.navbar_user';
35 35
     /**
36 36
      * used to receive breadcrumb data
37 37
      */
38
-    const THEME_BREADCRUMB            = 'theme.breadcrumb';
38
+    const THEME_BREADCRUMB = 'theme.breadcrumb';
39 39
     /**
40 40
      * used to receive the current user for the sidebar
41 41
      */
42
-    const THEME_SIDEBAR_USER          = 'theme.sidebar_user';
42
+    const THEME_SIDEBAR_USER = 'theme.sidebar_user';
43 43
     /**
44 44
      * Used for searching
45 45
      * @unused
46 46
      */
47
-    const THEME_SIDEBAR_SEARCH        = 'theme.sidebar_search';
47
+    const THEME_SIDEBAR_SEARCH = 'theme.sidebar_search';
48 48
     /**
49 49
      * Used to receive the sidebar menu data
50 50
      */
51
-    const THEME_SIDEBAR_SETUP_MENU    = 'theme.sidebar_setup_menu';
51
+    const THEME_SIDEBAR_SETUP_MENU = 'theme.sidebar_setup_menu';
52 52
     /**
53 53
      * Used to receive the sidebar menu data
54 54
      */
55
-    const THEME_SIDEBAR_SETUP_MENU_KNP    = 'theme.sidebar_setup_menu_knp';
55
+    const THEME_SIDEBAR_SETUP_MENU_KNP = 'theme.sidebar_setup_menu_knp';
56 56
     /**
57 57
      *
58 58
      */
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Event/SidebarMenuEvent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
      */
75 75
     public function getActive() {
76 76
 
77
-        foreach($this->getItems() as $item) {
77
+        foreach ($this->getItems() as $item) {
78 78
             /** @var $item MenuItemInterface */
79
-            if($item->isActive()) return $item;
79
+            if ($item->isActive()) return $item;
80 80
         }
81 81
         return null;
82 82
     }
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/UserModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
      */
31 31
     protected $isOnline = false;
32 32
 
33
-    function __construct($username='', $avatar = '', $memberSince = null, $isOnline = true)
33
+    function __construct($username = '', $avatar = '', $memberSince = null, $isOnline = true)
34 34
     {
35 35
         $this->avatar      = $avatar;
36 36
         $this->isOnline    = $isOnline;
37
-        $this->memberSince = $memberSince ?:new \DateTime();
37
+        $this->memberSince = $memberSince ?: new \DateTime();
38 38
         $this->username    = $username;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/TaskModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@
 block discarded – undo
19 19
     /**
20 20
      *
21 21
      */
22
-    const COLOR_AQUA   = 'aqua';
22
+    const COLOR_AQUA = 'aqua';
23 23
     /**
24 24
      *
25 25
      */
26
-    const COLOR_GREEN  = 'green';
26
+    const COLOR_GREEN = 'green';
27 27
     /**
28 28
      *
29 29
      */
30
-    const COLOR_RED    = 'red';
30
+    const COLOR_RED = 'red';
31 31
     /**
32 32
      *
33 33
      */
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/MessageModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
      * @param null          $sentAt
52 52
      * @param UserInterface $to
53 53
      */
54
-    function __construct(UserInterface $from = null, $subject= '', $sentAt = null, UserInterface $to = null)
54
+    function __construct(UserInterface $from = null, $subject = '', $sentAt = null, UserInterface $to = null)
55 55
     {
56 56
         $this->to      = $to;
57 57
         $this->subject = $subject;
58
-        $this->sentAt  = $sentAt ? : new \DateTime();
58
+        $this->sentAt  = $sentAt ?: new \DateTime();
59 59
         $this->from    = $from;
60 60
     }
61 61
 
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Controller/ExceptionController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     protected function findTemplate(Request $request, $format, $code, $debug)
26 26
     {
27 27
 
28
-        if(strpos($request->getPathInfo(), '/admin') !== 0) {
28
+        if (strpos($request->getPathInfo(), '/admin') !== 0) {
29 29
             return parent::findTemplate($request, $format, $code, $debug);
30 30
         }
31 31
 
Please login to merge, or discard this patch.