Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
src/Chamilo/ThemeBundle/EventListener/SidebarSetupMenuDemoListener.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -43,6 +43,9 @@
 block discarded – undo
43 43
 
44 44
     }
45 45
 
46
+    /**
47
+     * @param MenuItemModel[] $items
48
+     */
46 49
     protected function activateByRoute($route, $items) {
47 50
 
48 51
         foreach($items as $item) { /** @var $item MenuItemModel */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
 
46 46
     protected function activateByRoute($route, $items) {
47 47
 
48
-        foreach($items as $item) { /** @var $item MenuItemModel */
49
-            if($item->hasChildren()) {
48
+        foreach ($items as $item) { /** @var $item MenuItemModel */
49
+            if ($item->hasChildren()) {
50 50
                 $this->activateByRoute($route, $item->getChildren());
51 51
             }
52 52
             else {
53
-                if($item->getRoute() == $route) {
53
+                if ($item->getRoute() == $route) {
54 54
                     $item->setIsActive(true);
55 55
                 }
56 56
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -250,8 +250,7 @@
 block discarded – undo
250 250
         case RESULT_DISABLE_SHOW_SCORE_ONLY:
251 251
             if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_END) {
252 252
                $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'));
253
-            }
254
-            else {
253
+            } else {
255 254
                 $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'), get_lang('Details'));
256 255
             }
257 256
             break;
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/MenuItemModel.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -60,6 +60,11 @@
 block discarded – undo
60 60
      */
61 61
     protected $parent = null;
62 62
 
63
+    /**
64
+     * @param string $id
65
+     * @param string $label
66
+     * @param string $route
67
+     */
63 68
     function __construct(
64 69
         $id,
65 70
         $label,
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/MessageModel.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      *
49 49
      * @param UserInterface $from
50 50
      * @param string        $subject
51
-     * @param null          $sentAt
51
+     * @param \DateTime          $sentAt
52 52
      * @param UserInterface $to
53 53
      */
54 54
     function __construct(UserInterface $from = null, $subject= '', $sentAt = null, UserInterface $to = null)
Please login to merge, or discard this 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/Model/NotificationModel.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@
 block discarded – undo
18 18
 
19 19
     protected $icon;
20 20
 
21
+    /**
22
+     * @param string $message
23
+     */
21 24
     function __construct($message = null, $type = 'info', $icon = 'fa fa-warning')
22 25
     {
23 26
         $this->message = $message;
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Model/TaskModel.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     protected $title;
51 51
 
52 52
     /**
53
-     * @param null   $title
53
+     * @param string   $title
54 54
      * @param int    $progress
55 55
      * @param string $color
56 56
      */
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     }
94 94
 
95 95
     /**
96
-     * @return mixed
96
+     * @return integer
97 97
      */
98 98
     public function getProgress()
99 99
     {
Please login to merge, or discard this 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/Theme/ThemeManager.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -52,6 +52,10 @@
 block discarded – undo
52 52
 
53 53
     }
54 54
 
55
+    /**
56
+     * @param string $id
57
+     * @param string $src
58
+     */
55 59
     public function registerStyle($id, $src, $deps = array()) {
56 60
         if(!isset($this->stylesheets[$id])) {
57 61
             $this->stylesheets[$id] = array(
Please login to merge, or discard this 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.
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.