@@ -73,7 +73,7 @@ |
||
| 73 | 73 | * |
| 74 | 74 | * Proxies to {@link render()}. |
| 75 | 75 | * |
| 76 | - * @param null|ElementInterface $element |
|
| 76 | + * @param null|ElementInterface $elements |
|
| 77 | 77 | * @param null|string $labelPosition |
| 78 | 78 | * @param bool $renderErrors |
| 79 | 79 | * @return string|FormRow |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | return sprintf( |
| 65 | - '<div class="controls controls-row ' . $form_row_class . '">%s%s</div>', |
|
| 65 | + '<div class="controls controls-row '.$form_row_class.'">%s%s</div>', |
|
| 66 | 66 | $labelMarkup, |
| 67 | 67 | $markups |
| 68 | 68 | ); |
@@ -88,6 +88,11 @@ |
||
| 88 | 88 | return $content; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + /** |
|
| 92 | + * @param FormInterface $form |
|
| 93 | + * |
|
| 94 | + * @return null|FormInterface |
|
| 95 | + */ |
|
| 91 | 96 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 92 | 97 | { |
| 93 | 98 | if ($form instanceof ViewPartialProviderInterface) { |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | - . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 70 | + . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | + . $content . '</div>' . $this->closeTag(); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function renderButtons($buttons) |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 82 | 82 | |
| 83 | 83 | $content.= '<button ' . $attrs . '>' |
| 84 | - . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 85 | - . '</button>'; |
|
| 84 | + . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 85 | + . '</button>'; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | return $content; |
@@ -118,15 +118,15 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
| 120 | 120 | $content.='<div class="input-group col-md-' . $cols . '">' |
| 121 | - . $formElement($element) |
|
| 122 | - . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 124 | - . '</div>'; |
|
| 121 | + . $formElement($element) |
|
| 122 | + . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 123 | + . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 124 | + . '</div>'; |
|
| 125 | 125 | $buttonsRendered = true; |
| 126 | 126 | } else { |
| 127 | 127 | $content .= '<div class="input-group col-md-' . $cols . '">' |
| 128 | - . $formElement($element) |
|
| 129 | - . '</div>'; |
|
| 128 | + . $formElement($element) |
|
| 129 | + . '</div>'; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $i += 1; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 138 | 138 | } |
| 139 | 139 | $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
| 140 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 140 | + . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $content; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @param array $colMap |
| 36 | 36 | * @return Form|string |
| 37 | 37 | */ |
| 38 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
| 38 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
| 39 | 39 | { |
| 40 | 40 | if (!$form) { |
| 41 | 41 | return $this; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return $this->render($form, $colMap); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
| 47 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
| 48 | 48 | { |
| 49 | 49 | $headscript = $this->getView()->plugin('headscript'); |
| 50 | 50 | $basepath = $this->getView()->plugin('basepath'); |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | $form->prepare(); |
| 62 | 62 | |
| 63 | 63 | if ($form instanceof ViewPartialProviderInterface) { |
| 64 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 64 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | 70 | . '<div class="row" style="padding: 0 15px;">' |
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 71 | + . $content.'</div>'.$this->closeTag(); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | public function renderButtons($buttons) |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $button->removeAttribute('name'); |
| 81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 82 | 82 | |
| 83 | - $content.= '<button ' . $attrs . '>' |
|
| 83 | + $content .= '<button '.$attrs.'>' |
|
| 84 | 84 | . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
| 85 | 85 | . '</button>'; |
| 86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 92 | 92 | { |
| 93 | 93 | if ($form instanceof ViewPartialProviderInterface) { |
| 94 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 94 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if (null === $colMap) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $formElement = $this->getView()->plugin('formElement'); |
| 102 | 102 | $content = ''; |
| 103 | 103 | $buttonsRendered = false; |
| 104 | - $i=0; |
|
| 104 | + $i = 0; |
|
| 105 | 105 | foreach ($form as $element) { |
| 106 | 106 | if ($element instanceof Hidden) { |
| 107 | 107 | $content .= $formElement($element); |
@@ -117,14 +117,14 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
| 120 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
| 120 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 121 | 121 | . $formElement($element) |
| 122 | 122 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
| 123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 123 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
| 124 | 124 | . '</div>'; |
| 125 | 125 | $buttonsRendered = true; |
| 126 | 126 | } else { |
| 127 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
| 127 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 128 | 128 | . $formElement($element) |
| 129 | 129 | . '</div>'; |
| 130 | 130 | } |
@@ -136,8 +136,8 @@ discard block |
||
| 136 | 136 | if (null === $buttonsSpan) { |
| 137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 138 | 138 | } |
| 139 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
| 140 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 139 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
| 140 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $content; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * @param string $requestedName |
| 32 | 32 | * @param null|array $options |
| 33 | 33 | * |
| 34 | - * @return object |
|
| 34 | + * @return Locale |
|
| 35 | 35 | * @throws ServiceNotFoundException if unable to resolve the service. |
| 36 | 36 | * @throws ServiceNotCreatedException if an exception is raised when |
| 37 | 37 | * creating a service. |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | * |
| 66 | 66 | * @param MvcEvent $event |
| 67 | 67 | * |
| 68 | - * @return null|\Zend\Http\PhpEnvironment\Response |
|
| 68 | + * @return null|\Zend\Stdlib\ResponseInterface |
|
| 69 | 69 | * @throws \UnexpectedValueException |
| 70 | 70 | */ |
| 71 | 71 | public function onRoute(MvcEvent $event) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @var array |
| 49 | 49 | */ |
| 50 | 50 | private $events = [ |
| 51 | - [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ], |
|
| 51 | + [MvcEvent::EVENT_ROUTE, 'onRoute', 100], |
|
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $ajaxEvent->setRequest($request); |
| 89 | 89 | $ajaxEvent->setResponse($response); |
| 90 | 90 | |
| 91 | - $results = $this->ajaxEventManager->triggerEventUntil(function ($r) { |
|
| 91 | + $results = $this->ajaxEventManager->triggerEventUntil(function($r) { |
|
| 92 | 92 | return null !== $r; |
| 93 | 93 | }, $ajaxEvent); |
| 94 | 94 | $result = $results->last() ?: $ajaxEvent->getResult(); |
@@ -215,8 +215,8 @@ |
||
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | /** |
| 218 | - * @param $response |
|
| 219 | - * @param $uri |
|
| 218 | + * @param \Zend\Stdlib\ResponseInterface $response |
|
| 219 | + * @param string $uri |
|
| 220 | 220 | * |
| 221 | 221 | * @return mixed |
| 222 | 222 | */ |
@@ -124,10 +124,10 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | $router = $e->getRouter(); |
| 127 | - $basePath=$router->getBaseUrl(); |
|
| 127 | + $basePath = $router->getBaseUrl(); |
|
| 128 | 128 | $match = []; |
| 129 | 129 | |
| 130 | - if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) { |
|
| 130 | + if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) { |
|
| 131 | 131 | /* It seems we have already a language in the URI |
| 132 | 132 | * Now there are two possibilities: |
| 133 | 133 | * |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $options = $this->moduleOptions; |
| 163 | 163 | // using default language if detect language is disabled |
| 164 | - $lang = $options->isDetectLanguage() ? $this->detectLanguage($e):$options->getDefaultLanguage(); |
|
| 164 | + $lang = $options->isDetectLanguage() ? $this->detectLanguage($e) : $options->getDefaultLanguage(); |
|
| 165 | 165 | $langUri = rtrim("$basePath/$lang$origUri", '/'); |
| 166 | 166 | if ($router->match($request->setUri($langUri)) instanceof RouteMatch) { |
| 167 | 167 | $e->stopPropagation(true); |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | setlocale( |
| 213 | 213 | LC_ALL, |
| 214 | 214 | array( |
| 215 | - $locale . ".utf8", |
|
| 216 | - $locale . ".iso88591", |
|
| 215 | + $locale.".utf8", |
|
| 216 | + $locale.".iso88591", |
|
| 217 | 217 | $locale, |
| 218 | 218 | substr($locale, 0, 2), |
| 219 | 219 | 'de_DE.utf8', |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @param string $name |
| 126 | 126 | * @param mixed $value |
| 127 | - * @return ViewModel |
|
| 127 | + * @return HTMLTemplateMessage |
|
| 128 | 128 | */ |
| 129 | 129 | public function setVariable($name, $value) |
| 130 | 130 | { |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | * |
| 186 | 186 | * Resets the internal variable container to an empty container. |
| 187 | 187 | * |
| 188 | - * @return ViewModel |
|
| 188 | + * @return HTMLTemplateMessage |
|
| 189 | 189 | */ |
| 190 | 190 | public function clearVariables() |
| 191 | 191 | { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | /** |
| 197 | 197 | * |
| 198 | - * @param $template |
|
| 198 | + * @param string $template |
|
| 199 | 199 | * |
| 200 | 200 | * @return self |
| 201 | 201 | */ |
@@ -205,6 +205,9 @@ discard block |
||
| 205 | 205 | return $this; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @return string |
|
| 210 | + */ |
|
| 208 | 211 | public function getTemplate() |
| 209 | 212 | { |
| 210 | 213 | return $this->template; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /* @var \Zend\Mvc\View\Http\ViewManager $viewManager */ |
| 236 | - $viewManager = $this->serviceManager->get('ViewManager'); |
|
| 236 | + $viewManager = $this->serviceManager->get('ViewManager'); |
|
| 237 | 237 | $resolver = $this->serviceManager->get('ViewResolver'); |
| 238 | 238 | |
| 239 | 239 | /* @var \Zend\Mvc\MvcEvent $event */ |
@@ -241,13 +241,13 @@ discard block |
||
| 241 | 241 | $lang = $forceLanguage ?: $event->getRouteMatch()->getParam('lang'); |
| 242 | 242 | |
| 243 | 243 | |
| 244 | - if ($resolver->resolve($this->getTemplate() . '.' . $lang)) { |
|
| 245 | - $viewModel->setTemplate($this->getTemplate() . '.' . $lang); |
|
| 244 | + if ($resolver->resolve($this->getTemplate().'.'.$lang)) { |
|
| 245 | + $viewModel->setTemplate($this->getTemplate().'.'.$lang); |
|
| 246 | 246 | } else { |
| 247 | 247 | $viewModel->setTemplate($this->getTemplate()); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - $view = $viewManager->getView(); |
|
| 250 | + $view = $viewManager->getView(); |
|
| 251 | 251 | |
| 252 | 252 | $viewModel->setVariables($this->getVariables()); |
| 253 | 253 | $viewModel->setVariable('mail', $this); |
@@ -16,6 +16,9 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | class MailServiceConfig extends Config |
| 18 | 18 | { |
| 19 | + /** |
|
| 20 | + * @return \Zend\Mail\Transport\TransportInterface |
|
| 21 | + */ |
|
| 19 | 22 | public function getTransport() |
| 20 | 23 | { |
| 21 | 24 | return isset($this->config['transport']) |
@@ -40,6 +43,9 @@ discard block |
||
| 40 | 43 | return null; |
| 41 | 44 | } |
| 42 | 45 | |
| 46 | + /** |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 43 | 49 | public function getMailer() |
| 44 | 50 | { |
| 45 | 51 | return isset($this->data['mailer']) |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $recipients->add($match[1]); |
| 70 | 70 | } |
| 71 | 71 | } else { |
| 72 | - trigger_error('invalid address format ("' . $recipient . '") in mails.develop.override_recipient', E_USER_WARNING); |
|
| 72 | + trigger_error('invalid address format ("'.$recipient.'") in mails.develop.override_recipient', E_USER_WARNING); |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | return $recipients; |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * </pre> |
| 103 | 103 | * |
| 104 | 104 | * @param string $subject |
| 105 | - * @param bool|mixed $translate |
|
| 105 | + * @param string $translate |
|
| 106 | 106 | * |
| 107 | 107 | * @since 0.19 |
| 108 | 108 | * @since 0.29 Add sprintf support for translation |
@@ -34,6 +34,9 @@ |
||
| 34 | 34 | { |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $directory |
|
| 39 | + */ |
|
| 37 | 40 | public static function load($directory) |
| 38 | 41 | { |
| 39 | 42 | $directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | public static function load($directory) |
| 38 | 38 | { |
| 39 | - $directory = rtrim($directory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
| 39 | + $directory = rtrim($directory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
| 40 | 40 | $env = getenv('APPLICATION_ENV') ?: 'production'; |
| 41 | 41 | $pattern = sprintf('%s{,*.}{config,%s}.php', $directory, $env); |
| 42 | 42 | $config = array(); |