@@ -66,13 +66,13 @@ |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | $output = '<div class="br-widget br-readonly ' |
69 | - . ('compact' == $mode ? ' br-compact' : '' ) |
|
70 | - . '" title="' . $this->getView()->translate(self::$ratingValueMap[$rating]) . '">'; |
|
71 | - for ($i=1; $i<6; $i++) { |
|
69 | + . ('compact' == $mode ? ' br-compact' : '') |
|
70 | + . '" title="'.$this->getView()->translate(self::$ratingValueMap[$rating]).'">'; |
|
71 | + for ($i = 1; $i < 6; $i++) { |
|
72 | 72 | $class = $i <= $rating ? 'br-selected' : ''; |
73 | 73 | $class .= $i == $rating ? ' br-current' : ''; |
74 | 74 | |
75 | - $output .= '<a class="' . $class . '"></a>'; |
|
75 | + $output .= '<a class="'.$class.'"></a>'; |
|
76 | 76 | } |
77 | 77 | $output .= '</div>'; |
78 | 78 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | : ''; |
59 | 59 | |
60 | 60 | if (false !== strpos($urlOrEmail, '@')) { |
61 | - $urlOrEmail = 'mailto:' . $urlOrEmail; |
|
61 | + $urlOrEmail = 'mailto:'.$urlOrEmail; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return sprintf('<a %s href="%s">%s</a>', $attributesStr, $urlOrEmail, $label); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $attr = array(); |
74 | 74 | |
75 | 75 | foreach ($attributes as $name => $value) { |
76 | - $attr[] = $escape($name) . '="' . $escapeAttr($value) . '"'; |
|
76 | + $attr[] = $escape($name).'="'.$escapeAttr($value).'"'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return implode(' ', $attr); |
@@ -142,18 +142,18 @@ discard block |
||
142 | 142 | return $this->start($type, $options); |
143 | 143 | } |
144 | 144 | |
145 | - $id = isset($options['id']) ? ' id="' . $options['id'] . '"' : ''; |
|
146 | - $class = isset($options['class']) ? ' ' . $options['class'] : ''; |
|
145 | + $id = isset($options['id']) ? ' id="'.$options['id'].'"' : ''; |
|
146 | + $class = isset($options['class']) ? ' '.$options['class'] : ''; |
|
147 | 147 | if ((isset($options['dismissable']) && $options['dismissable']) |
148 | 148 | || !isset($options['dismissable']) |
149 | 149 | ) { |
150 | 150 | $class .= ' alert-dismissable'; |
151 | 151 | $content = '<button type="button" class="close" data-dismiss="alert">×</button>' |
152 | - . '<span class="notification-content">' . $content . '</span>'; |
|
152 | + . '<span class="notification-content">'.$content.'</span>'; |
|
153 | 153 | } |
154 | 154 | |
155 | - $target = array_key_exists('target', $options)?' target="' . $options['target'] . '"':''; |
|
156 | - $markup = '<div ' . $id . ' class="alert alert-' . $type . $class . '" ' . $target . '>' . $content . '</div>' . PHP_EOL; |
|
155 | + $target = array_key_exists('target', $options) ? ' target="'.$options['target'].'"' : ''; |
|
156 | + $markup = '<div '.$id.' class="alert alert-'.$type.$class.'" '.$target.'>'.$content.'</div>'.PHP_EOL; |
|
157 | 157 | return $markup; |
158 | 158 | } |
159 | 159 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | public function __call($method, $args) |
192 | 192 | { |
193 | 193 | if (!in_array($method, array(self::TYPE_INFO, self::TYPE_DANGER, self::TYPE_SUCCESS, self::TYPE_WARNING))) { |
194 | - throw new \BadMethodCallException('Unknown method: ' . $method); |
|
194 | + throw new \BadMethodCallException('Unknown method: '.$method); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | // We know that $method is one of the valid types, so we can safely use it as "type"-parameter for the |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | if (is_string($specs)) { |
61 | - $helper->appendScript('// if you are missing the script ' . $specs . ' look up your config and enclose it in an array'); |
|
61 | + $helper->appendScript('// if you are missing the script '.$specs.' look up your config and enclose it in an array'); |
|
62 | 62 | continue; |
63 | 63 | } |
64 | 64 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | protected function checkObjectType($object) |
58 | 58 | { |
59 | 59 | if (!$object instanceof $this->objectType) { |
60 | - throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType); |
|
60 | + throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -39,11 +39,11 @@ |
||
39 | 39 | $element->setLabel(''); |
40 | 40 | $element->setAttribute('placeholder', $label); |
41 | 41 | } |
42 | - $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE) . ' '; |
|
42 | + $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE).' '; |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
47 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
48 | 48 | } |
49 | 49 | } |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | |
77 | 77 | // Does this element have errors ? |
78 | 78 | if (!empty($elementErrors) && !empty($inputErrorClass) && $this->layout != Form::LAYOUT_BARE) { |
79 | - $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : ''); |
|
80 | - $classAttributes = $classAttributes . $inputErrorClass; |
|
79 | + $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : ''); |
|
80 | + $classAttributes = $classAttributes.$inputErrorClass; |
|
81 | 81 | |
82 | 82 | $element->setAttribute('class', $classAttributes); |
83 | 83 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | if (!$element->hasAttribute('id')) { |
86 | 86 | $elementId = preg_replace( |
87 | 87 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
88 | - array('-' , '-', ''), |
|
88 | + array('-', '-', ''), |
|
89 | 89 | $element->getName() |
90 | 90 | ); |
91 | 91 | $element->setAttribute('id', $elementId); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | // moved label here so we can change it in the ElementViewHelper |
134 | - $label = $element->getLabel(); |
|
134 | + $label = $element->getLabel(); |
|
135 | 135 | if (isset($label) && '' !== $label && !$element instanceof \Zend\Form\Element\Button) { |
136 | 136 | // Translate the label |
137 | 137 | if (null !== ($translator = $this->getTranslator())) { |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | } |
174 | 174 | $element->setLabelAttributes($labelAttributes); |
175 | 175 | |
176 | - $label = $labelHelper($element,$label); |
|
176 | + $label = $labelHelper($element, $label); |
|
177 | 177 | if ($this->shouldWrap) { |
178 | 178 | $spanWidth = 12 - $labelWidth; |
179 | 179 | $elementString = sprintf( |
180 | - '<div class="col-md-%d%s" id="' . $elementId . '-span">%s</div>', |
|
180 | + '<div class="col-md-%d%s" id="'.$elementId.'-span">%s</div>', |
|
181 | 181 | $spanWidth, |
182 | 182 | $elementErrors ? " $inputErrorClass" : '', |
183 | 183 | $elementString |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | ); |
190 | 190 | |
191 | 191 | } |
192 | - $markup = $label . $elementString; |
|
192 | + $markup = $label.$elementString; |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | } else { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | && !$element instanceof \Zend\Form\Element\Button |
211 | 211 | && $this->layout != Form::LAYOUT_BARE |
212 | 212 | ) { |
213 | - $markup = sprintf('<div class="controls controls-row ' . $form_row_class . '">%s</div>', $markup); |
|
213 | + $markup = sprintf('<div class="controls controls-row '.$form_row_class.'">%s</div>', $markup); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $markup; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $class = $form->getAttribute('class'); |
90 | 90 | $class = preg_replace('~\bform-[^ ]+\b~', '', $class); |
91 | - $class .= ' ' . $layout; |
|
91 | + $class .= ' '.$layout; |
|
92 | 92 | |
93 | 93 | $form->setAttribute('class', $class); |
94 | 94 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'id', |
98 | 98 | preg_replace( |
99 | 99 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
100 | - array('-' , '-' , '' ), |
|
100 | + array('-', '-', ''), |
|
101 | 101 | $formId |
102 | 102 | ) |
103 | 103 | ); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | if (!$element->hasAttribute('id')) { |
119 | 119 | $elementId = preg_replace( |
120 | 120 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
121 | - array('-' , '-', ''), |
|
121 | + array('-', '-', ''), |
|
122 | 122 | $element->getName() |
123 | 123 | ); |
124 | 124 | $element->setAttribute('id', $elementId); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
159 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ); |
185 | 185 | |
186 | 186 | if ($desc = $form->getOption('description', '')) { |
187 | - $descriptionParams=$form->getOption('description_params'); |
|
187 | + $descriptionParams = $form->getOption('description_params'); |
|
188 | 188 | $translator = $this->getTranslator(); |
189 | 189 | $textDomain = $this->getTranslatorTextDomain(); |
190 | 190 | $desc = $translator->translate($desc, $textDomain); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $desc |
206 | 206 | ); |
207 | 207 | } else { |
208 | - $formContent = '<div class="form-content">' . $formContent . '</div>'; |
|
208 | + $formContent = '<div class="form-content">'.$formContent.'</div>'; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | $markup = '<div id="form-%s" class="form-container">' |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | . '</div>'; |
215 | 215 | |
216 | 216 | if ($label = $form->getLabel()) { |
217 | - $label = '<div class="form-headline"><h3>' . $renderer->translate($label) . '</h3></div>'; |
|
217 | + $label = '<div class="form-headline"><h3>'.$renderer->translate($label).'</h3></div>'; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | return sprintf( |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @var string |
28 | 28 | */ |
29 | - protected $language="de"; |
|
29 | + protected $language = "de"; |
|
30 | 30 | |
31 | 31 | public function __invoke(ElementInterface $element = null) |
32 | 32 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /* |
61 | 61 | * |
62 | 62 | */ |
63 | - $markup = '<div class="input-group date">%s<div data-toggle="description" data-target="%s" class="input-group-addon" onClick="$(this).parent().find(\':input\').datepicker(\'show\')">' . |
|
63 | + $markup = '<div class="input-group date">%s<div data-toggle="description" data-target="%s" class="input-group-addon" onClick="$(this).parent().find(\':input\').datepicker(\'show\')">'. |
|
64 | 64 | '<i class="fa fa-calendar"></i></div></div><div class="checkbox"></div>'; |
65 | 65 | |
66 | 66 | $markup = sprintf( |