@@ -74,7 +74,7 @@ |
||
74 | 74 | public function getMenu($name) |
75 | 75 | { |
76 | 76 | if (!$this->_menus[$name]) { |
77 | - $class = 'Nip_Tool_Menu_'.ucfirst($name); |
|
77 | + $class = 'Nip_Tool_Menu_' . ucfirst($name); |
|
78 | 78 | $this->_menus[$name] = new $class(); |
79 | 79 | $this->_menus[$name]->setTool($this); |
80 | 80 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function __construct(array $array = [], $allowModifications = false) |
44 | 44 | { |
45 | - $this->allowModifications = (bool)$allowModifications; |
|
45 | + $this->allowModifications = (bool) $allowModifications; |
|
46 | 46 | |
47 | 47 | foreach ($array as $key => $value) { |
48 | 48 | $this->setDataItem($key, $value); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * Retrieve a value and return $default if there is no element set. |
82 | 82 | * |
83 | 83 | * @param string $key |
84 | - * @param mixed $default |
|
84 | + * @param string $default |
|
85 | 85 | * @return mixed |
86 | 86 | */ |
87 | 87 | public function get($key, $default = null) |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * @param $key |
|
99 | + * @param string $key |
|
100 | 100 | * @return mixed|null |
101 | 101 | */ |
102 | 102 | public function getByKey($key) |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
123 | - * @param $path |
|
123 | + * @param string $path |
|
124 | 124 | * @return string |
125 | 125 | */ |
126 | 126 | protected function getByPath($path) |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
166 | - * @param $path |
|
166 | + * @param string $path |
|
167 | 167 | * @return bool |
168 | 168 | */ |
169 | 169 | public function hasByPath($path) |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | public function getModelMessage($name, $variables = array()) |
26 | 26 | { |
27 | - return $this->getModel()->getManager()->getMessage('form.'.$name, $variables); |
|
27 | + return $this->getModel()->getManager()->getMessage('form.' . $name, $variables); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $decorator = $this->generate(); |
51 | 51 | switch ($this->_placement) { |
52 | 52 | case self::PREPEND: |
53 | - return $decorator . $this->getSeparator() . $content; |
|
53 | + return $decorator . $this->getSeparator() . $content; |
|
54 | 54 | case self::APPEND: |
55 | 55 | default: |
56 | 56 | return $content . $this->getSeparator() . $decorator; |
@@ -2,9 +2,9 @@ |
||
2 | 2 | class Nip_Form_Renderer_Elements_Checkbox extends Nip_Form_Renderer_Elements_Input_Abstract { |
3 | 3 | |
4 | 4 | public function generateElement() { |
5 | - if (!$this->getElement()->getValue()) { |
|
6 | - $this->getElement()->setValue('on'); |
|
7 | - } |
|
5 | + if (!$this->getElement()->getValue()) { |
|
6 | + $this->getElement()->setValue('on'); |
|
7 | + } |
|
8 | 8 | $this->getElement()->removeClass('form-control'); |
9 | 9 | |
10 | 10 | $return = '<div class="checkbox">'; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $return = '<div class="checkbox">'; |
11 | 11 | $return .= '<label>'; |
12 | 12 | $return .= parent::generateElement(); |
13 | - $return .= ' '. $this->getElement()->getLabel(); |
|
13 | + $return .= ' ' . $this->getElement()->getLabel(); |
|
14 | 14 | $return .= '</label>'; |
15 | 15 | $return .= '</div>'; |
16 | 16 | return $return; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | public function generateElement() { |
5 | 5 | $return = '<textarea '; |
6 | 6 | $return .= $this->renderAttributes(); |
7 | - $return .= ' >'. $this->getElement()->getValue() .'</textarea>'; |
|
7 | + $return .= ' >' . $this->getElement()->getValue() . '</textarea>'; |
|
8 | 8 | return $return; |
9 | 9 | } |
10 | 10 |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | public function generateElement() { |
5 | 5 | $return = '<select '; |
6 | 6 | $return .= $this->renderAttributes(); |
7 | - $return .= ' >'. $this->renderOptions() .'</select>'; |
|
7 | + $return .= ' >' . $this->renderOptions() . '</select>'; |
|
8 | 8 | return $return; |
9 | 9 | } |
10 | 10 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | $atribs['value'] = $value; |
26 | 26 | $selectedValue = $this->getElement()->getValue(); |
27 | - if ($selectedValue === 0 OR $value=== 0) { |
|
27 | + if ($selectedValue === 0 OR $value === 0) { |
|
28 | 28 | if ($value === $selectedValue) { |
29 | 29 | $atribs['selected'] = 'selected'; |
30 | 30 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | foreach ($atribs as $name=>$value) { |
36 | 36 | $return .= ' ' . $name . '="' . $value . '"'; |
37 | 37 | } |
38 | - $return .= '>'.$label.'</option>'; |
|
38 | + $return .= '>' . $label . '</option>'; |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | return $return; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @return Nip_Form_Renderer_Abstract |
9 | - */ |
|
9 | + */ |
|
10 | 10 | public function getRenderer() { |
11 | 11 | return $this->_renderer; |
12 | 12 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | public function renderElement() { |
45 | - $return = $this->renderDecorators($this->generateElement(), 'element'); |
|
45 | + $return = $this->renderDecorators($this->generateElement(), 'element'); |
|
46 | 46 | $this->getElement()->setRendered(true); |
47 | 47 | return $return; |
48 | 48 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($this->getElement()->isError() && $this->getElement()->getForm()->getOption('renderElementErrors') !== false) { |
69 | 69 | $errors = $this->getElement()->getErrors(); |
70 | 70 | $errors_string = implode('<br />', $errors); |
71 | - $return .= '<span class="help-inline">' . $errors_string .'</span>'; |
|
71 | + $return .= '<span class="help-inline">' . $errors_string . '</span>'; |
|
72 | 72 | } |
73 | 73 | return $return; |
74 | 74 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $value = $overrides[$name]; |
87 | 87 | } |
88 | 88 | if ($name == "name" && $this->getElement()->isGroup()) { |
89 | - $value = $value."[]"; |
|
89 | + $value = $value . "[]"; |
|
90 | 90 | } |
91 | 91 | $return .= ' ' . $name . '="' . $value . '"'; |
92 | 92 | } |
@@ -8,8 +8,8 @@ |
||
8 | 8 | foreach ($elements as $key=>$element) { |
9 | 9 | $element->addClass('form-control'); |
10 | 10 | $returnElements[] = |
11 | - '<div class="col-xs-4" style="max-width: 100px;">'. |
|
12 | - $element->render(). |
|
11 | + '<div class="col-xs-4" style="max-width: 100px;">' . |
|
12 | + $element->render() . |
|
13 | 13 | '</div>'; |
14 | 14 | } |
15 | 15 |