@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * @inheritdoc |
81 | 81 | */ |
82 | - public function getId(){ |
|
82 | + public function getId() { |
|
83 | 83 | return $this->getOption('id') ?: $this->getName(); |
84 | 84 | } |
85 | 85 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * @return $this |
117 | 117 | */ |
118 | - public function required(){ |
|
118 | + public function required() { |
|
119 | 119 | $this->options['attr']['required'] = 'required'; |
120 | 120 | |
121 | 121 | return $this; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | /** |
125 | 125 | * @return $this |
126 | 126 | */ |
127 | - public function disable(){ |
|
127 | + public function disable() { |
|
128 | 128 | $this->options['attr']['disabled'] = 'disabled'; |
129 | 129 | return $this; |
130 | 130 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * @inheritdoc |
134 | 134 | */ |
135 | - public function isDisabled(){ |
|
135 | + public function isDisabled() { |
|
136 | 136 | return isset($this->options['attr']['disabled']); |
137 | 137 | } |
138 | 138 | |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | * |
142 | 142 | * @return string|int|boolean|null |
143 | 143 | */ |
144 | - public function getOption($option){ |
|
145 | - if(!isset($this->options[$option])){ |
|
144 | + public function getOption($option) { |
|
145 | + if (!isset($this->options[$option])) { |
|
146 | 146 | return null; |
147 | 147 | } |
148 | 148 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $select = $element; |
71 | 71 | $html = $this->renderSelectElement($select); |
72 | 72 | |
73 | - if(isset($options['ajax']) && $options['ajax']){ |
|
73 | + if (isset($options['ajax']) && $options['ajax']) { |
|
74 | 74 | $html .= ajax_combobox($element->getName()); |
75 | 75 | } |
76 | 76 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | default: |
80 | 80 | return sprintf('<input type="%s" class="%s" name="%s" value="%s" %s />', |
81 | 81 | $element->getType(), |
82 | - ' flat '.($element->hasError() ? 'error' : ''), |
|
82 | + ' flat ' . ($element->hasError() ? 'error' : ''), |
|
83 | 83 | $element->getName(), |
84 | 84 | $element->getValue(), |
85 | 85 | $this->formatOptions($element->getOptions()) |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | private function renderSelectElement(Select $element) |
121 | 121 | { |
122 | - $selectElement = sprintf('<select id="%s" class="%s" name="%s" >', $element->getId(),$element->hasError() ? 'error' : '', $element->getName()); |
|
122 | + $selectElement = sprintf('<select id="%s" class="%s" name="%s" >', $element->getId(), $element->hasError() ? 'error' : '', $element->getName()); |
|
123 | 123 | |
124 | 124 | if ($element->getValueOptions()) { |
125 | 125 | foreach ($element->getValueOptions() as $optionValue => $optionLabel) { |