Completed
Pull Request — 1.11.x (#1628)
by José
97:30 queued 69:06
created
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.
src/Chamilo/ThemeBundle/Controller/BreadcrumbController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $list = array();
59 59
         if ($active) {
60 60
             $list[] = $active;
61
-            while(null !== ($item = $active->getActiveChild())) {
61
+            while (null !== ($item = $active->getActiveChild())) {
62 62
                 $list[] = $item;
63 63
                 $active = $item;
64 64
             }
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Controller/DefaultController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     }
44 44
 
45 45
     public function formAction() {
46
-        $form =$this->createForm( new FormDemoModelType());
46
+        $form = $this->createForm(new FormDemoModelType());
47 47
         return $this->render('ChamiloThemeBundle:Default:form.html.twig', array(
48 48
                 'form' => $form->createView()
49 49
             ));
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Theme/ThemeManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     function __construct($container, $resolverClass = null)
37 37
     {
38 38
         $this->container     = $container;
39
-        $this->resolverClass = $resolverClass?: 'Chamilo\ThemeBundle\Util\DependencyResolver';
39
+        $this->resolverClass = $resolverClass ?: 'Chamilo\ThemeBundle\Util\DependencyResolver';
40 40
     }
41 41
 
42 42
     public function registerScript($id, $src, $deps = array(), $location = "bottom")
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
     public function registerStyle($id, $src, $deps = array()) {
56
-        if(!isset($this->stylesheets[$id])) {
56
+        if (!isset($this->stylesheets[$id])) {
57 57
             $this->stylesheets[$id] = array(
58 58
                 'src'      => $src,
59 59
                 'deps'     => $deps,
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
     public function getScripts($location = 'bottom') {
65 65
 
66 66
         $unsorted = array(); $srcList = array(); $assetList = array();
67
-        foreach($this->javascripts as $id => $scriptDefinition) {
68
-            if($scriptDefinition['location'] == $location) {
67
+        foreach ($this->javascripts as $id => $scriptDefinition) {
68
+            if ($scriptDefinition['location'] == $location) {
69 69
                 $unsorted[$id] = $scriptDefinition;
70 70
             }
71 71
         }
72 72
 
73 73
         $queue = $this->getResolver()->register($unsorted)->resolveAll();
74
-        foreach($queue as $def){
74
+        foreach ($queue as $def) {
75 75
             $srcList[] = $def['src'];
76 76
         }
77 77
         return $srcList;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function getStyles() {
81 81
         $srcList = array();
82 82
         $queue = $this->getResolver()->register($this->stylesheets)->resolveAll();
83
-        foreach($queue as $def){
83
+        foreach ($queue as $def) {
84 84
             $srcList[] = $def['src'];
85 85
         }
86 86
         return $srcList;
Please login to merge, or discard this patch.