@@ -57,6 +57,7 @@ discard block |
||
57 | 57 | * Add a value to the indexed item |
58 | 58 | * @param string Key |
59 | 59 | * @param string Value |
60 | + * @param string $key |
|
60 | 61 | * @return void |
61 | 62 | */ |
62 | 63 | function addValue($key, $value) { |
@@ -109,6 +110,7 @@ discard block |
||
109 | 110 | |
110 | 111 | /** |
111 | 112 | * Let add tool id term |
113 | + * @param string $tool_id |
|
112 | 114 | */ |
113 | 115 | public function addToolId($tool_id) |
114 | 116 | { |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
395 | - * @return ArrayCollection |
|
395 | + * @return CTool[] |
|
396 | 396 | */ |
397 | 397 | public function getTools() |
398 | 398 | { |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | } |
428 | 428 | |
429 | 429 | /** |
430 | - * @param $urls |
|
430 | + * @param ArrayCollection $urls |
|
431 | 431 | */ |
432 | 432 | public function setUrls($urls) |
433 | 433 | { |
@@ -1244,7 +1244,7 @@ discard block |
||
1244 | 1244 | } |
1245 | 1245 | |
1246 | 1246 | /** |
1247 | - * @return array |
|
1247 | + * @return string[] |
|
1248 | 1248 | */ |
1249 | 1249 | public static function getStatusList() |
1250 | 1250 | { |
@@ -43,6 +43,9 @@ |
||
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 */ |
@@ -45,12 +45,12 @@ |
||
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 | } |
@@ -250,8 +250,7 @@ |
||
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; |
@@ -60,6 +60,11 @@ |
||
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, |
@@ -48,7 +48,7 @@ |
||
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) |
@@ -51,11 +51,11 @@ |
||
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 |
@@ -18,6 +18,9 @@ |
||
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; |
@@ -50,7 +50,7 @@ discard block |
||
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 |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * @return mixed |
|
96 | + * @return integer |
|
97 | 97 | */ |
98 | 98 | public function getProgress() |
99 | 99 | { |
@@ -19,15 +19,15 @@ |
||
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 | */ |
@@ -52,6 +52,10 @@ |
||
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( |
@@ -36,7 +36,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -11,7 +11,7 @@ discard block |
||
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 |
||
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')) |