@@ -135,7 +135,7 @@ |
||
135 | 135 | public function getList($namespace, $callback) |
136 | 136 | { |
137 | 137 | $session = new Container($namespace); |
138 | - $params = $session->params?:array(); |
|
138 | + $params = $session->params ?: array(); |
|
139 | 139 | if (!$session->list) { |
140 | 140 | $session->list = is_array($callback) |
141 | 141 | ? call_user_func($callback, $session->params) |
@@ -111,7 +111,7 @@ |
||
111 | 111 | |
112 | 112 | $event = $this->loadEntitiesEvents->getEvent($entity, $this, $params); |
113 | 113 | $responses = $this->loadEntitiesEvents->triggerEventUntil( |
114 | - function ($response) { |
|
114 | + function($response) { |
|
115 | 115 | return (is_array($response) || $response instanceof \Traversable) && count($response); |
116 | 116 | }, |
117 | 117 | $event |
@@ -72,11 +72,11 @@ |
||
72 | 72 | public function get($form, $options = null, $params = null) |
73 | 73 | { |
74 | 74 | if (!is_object($form)) { |
75 | - $form = $this->formElementManager->get($form, $options); |
|
75 | + $form = $this->formElementManager->get($form, $options); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** @noinspection PhpUndefinedMethodInspection */ |
79 | - $params = $params ?: clone $this->getController()->getRequest()->getQuery(); |
|
79 | + $params = $params ?: clone $this->getController()->getRequest()->getQuery(); |
|
80 | 80 | |
81 | 81 | /* I tried using form methods (bind, isValid)... |
82 | 82 | * but because the search form could be in an invalidated state |
@@ -153,18 +153,18 @@ discard block |
||
153 | 153 | $replyTo = $this->stringFromMailHeader($this->getReplyTo()); |
154 | 154 | |
155 | 155 | return str_pad($template, 30) |
156 | - . 'to: ' . str_pad($to, 50) |
|
157 | - . 'cc: ' . str_pad($cc, 50) |
|
158 | - . 'bcc: ' . str_pad($bcc, 50) |
|
159 | - . 'from: ' . str_pad($from, 50) |
|
160 | - . 'replyTo: ' . str_pad($replyTo, 50) |
|
156 | + . 'to: '.str_pad($to, 50) |
|
157 | + . 'cc: '.str_pad($cc, 50) |
|
158 | + . 'bcc: '.str_pad($bcc, 50) |
|
159 | + . 'from: '.str_pad($from, 50) |
|
160 | + . 'replyTo: '.str_pad($replyTo, 50) |
|
161 | 161 | //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50) |
162 | - . 'subject: ' . str_pad($this->getSubject(), 50); |
|
162 | + . 'subject: '.str_pad($this->getSubject(), 50); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | public function template($template) |
166 | 166 | { |
167 | - $controller = is_object($this->controller) ? get_class($this->controller):'null'; |
|
167 | + $controller = is_object($this->controller) ? get_class($this->controller) : 'null'; |
|
168 | 168 | |
169 | 169 | $event = new Event(); |
170 | 170 | $eventManager = $this->eventManager; |
@@ -181,11 +181,11 @@ discard block |
||
181 | 181 | $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\'))); |
182 | 182 | $viewResolver = $this->viewResolver; |
183 | 183 | |
184 | - $templateHalf = 'mail/' . $template; |
|
184 | + $templateHalf = 'mail/'.$template; |
|
185 | 185 | $resource = $viewResolver->resolve($templateHalf); |
186 | 186 | |
187 | 187 | if (empty($resource)) { |
188 | - $templateFull = $controllerIdentifier . '/mail/' . $template; |
|
188 | + $templateFull = $controllerIdentifier.'/mail/'.$template; |
|
189 | 189 | $resource = $viewResolver->resolve($templateFull); |
190 | 190 | } |
191 | 191 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | unset($__vars[$key]); |
213 | 213 | } |
214 | 214 | } |
215 | - unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']); |
|
215 | + unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']); |
|
216 | 216 | $this->config = $__vars; |
217 | 217 | } |
218 | 218 | } |
@@ -237,20 +237,20 @@ discard block |
||
237 | 237 | if (isset($this->config['from'])) { |
238 | 238 | $from = $this->config['from']; |
239 | 239 | } else { |
240 | - $log->err('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
241 | - throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template); |
|
240 | + $log->err('A from email address must be provided (Variable $from) in Template: '.$template); |
|
241 | + throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template); |
|
242 | 242 | } |
243 | 243 | if (isset($this->config['fromName'])) { |
244 | 244 | $fromName = $this->config['fromName']; |
245 | 245 | } else { |
246 | - $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
247 | - throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template); |
|
246 | + $log->err('A from name must be provided (Variable $fromName) in Template: '.$template); |
|
247 | + throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template); |
|
248 | 248 | } |
249 | 249 | if (isset($this->config['subject'])) { |
250 | 250 | $subject = $this->config['subject']; |
251 | 251 | } else { |
252 | - $log->err('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
253 | - throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template); |
|
252 | + $log->err('A subject must be provided (Variable $subject) in Template: '.$template); |
|
253 | + throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template); |
|
254 | 254 | } |
255 | 255 | $this->setFrom($from, $fromName); |
256 | 256 | $this->setSubject($subject); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $erg = true; |
272 | 272 | $log->info($this); |
273 | 273 | } catch (\Exception $e) { |
274 | - $log->err('Mail failure ' . $e->getMessage()); |
|
274 | + $log->err('Mail failure '.$e->getMessage()); |
|
275 | 275 | } |
276 | 276 | return $erg; |
277 | 277 | } |
@@ -288,6 +288,6 @@ discard block |
||
288 | 288 | $viewResolver = $container->get('ViewResolver'); |
289 | 289 | $eventManager = $container->get('EventManager'); |
290 | 290 | $moduleManager = $container->get('ModuleManager'); |
291 | - return new static($mailLog,$viewResolver,$eventManager,$moduleManager); |
|
291 | + return new static($mailLog, $viewResolver, $eventManager, $moduleManager); |
|
292 | 292 | } |
293 | 293 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | if (!is_array($stack)) { |
81 | - throw new \InvalidArgumentException('Expected argument to be of type array, but received ' . gettype($stack)); |
|
81 | + throw new \InvalidArgumentException('Expected argument to be of type array, but received '.gettype($stack)); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | $stack = array_intersect_key($stack, ['params' => true, 'form' => true, 'paginator' => true]); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * |
148 | 148 | * @return self |
149 | 149 | */ |
150 | - public function params($namespace, $defaults = [ 'page' => 1 ]) |
|
150 | + public function params($namespace, $defaults = ['page' => 1]) |
|
151 | 151 | { |
152 | 152 | $this->stack['params'] = [$namespace, $defaults]; |
153 | 153 | return $this; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $queryArray[$match['name']][$v] = 1; |
243 | 243 | } |
244 | 244 | } else { |
245 | - $queryArray[ $match[ 'name' ] ] = $value; |
|
245 | + $queryArray[$match['name']] = $value; |
|
246 | 246 | } |
247 | 247 | unset($queryArray[$key]); |
248 | 248 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | const NAMESPACE_INFO = 'info'; |
22 | 22 | const NAMESPACE_WARNING = 'warning'; |
23 | 23 | const NAMESPACE_DANGER = 'danger'; |
24 | - const NAMESPACE_SUCCESS = 'success'; |
|
24 | + const NAMESPACE_SUCCESS = 'success'; |
|
25 | 25 | |
26 | 26 | protected $namespace2priority = array( |
27 | 27 | self::NAMESPACE_INFO => NotificationEntity::INFO, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function setListener($listener) |
61 | 61 | { |
62 | - $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this,'createOutput'), 1); |
|
62 | + $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this, 'createOutput'), 1); |
|
63 | 63 | $this->notificationListener = $listener; |
64 | 64 | } |
65 | 65 |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $target->__invoke($data); |
150 | 150 | $className = get_class($this->entity); |
151 | 151 | // @TODO, have to be abstract |
152 | - $snapShotMetaClassName = '\\' . $className . 'SnapshotMeta'; |
|
152 | + $snapShotMetaClassName = '\\'.$className.'SnapshotMeta'; |
|
153 | 153 | $meta = new $snapShotMetaClassName; |
154 | 154 | $meta->setEntity($target); |
155 | 155 | $meta->setSourceId($this->entity->id); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | if (empty($dataHead) || empty($targetClass)) { |
178 | 178 | return null; |
179 | 179 | } |
180 | - $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass . "Meta"); |
|
180 | + $repositorySnapshotMeta = $this->getRepositories()->getRepository($targetClass."Meta"); |
|
181 | 181 | $snapshot = $repositorySnapshotMeta->findSnapshot($this->entity); |
182 | 182 | // an snapshot has to be so simple that there is no need for a special hydrator |
183 | 183 | $hydrator = new EntityHydrator(); |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | // the snapshotgenerator is a service defined by the name of the entity |
248 | 248 | // this is the highest means, all subsequent means just add what is not set |
249 | 249 | $className = get_class($this->entity); |
250 | - if ($serviceLocator->has('snapshotgenerator' . $className)) { |
|
251 | - $generator = $this->serviceLocator->get('snapshotgenerator' . $className); |
|
250 | + if ($serviceLocator->has('snapshotgenerator'.$className)) { |
|
251 | + $generator = $this->serviceLocator->get('snapshotgenerator'.$className); |
|
252 | 252 | if (is_array($generator)) { |
253 | 253 | $this->options = ArrayUtils::merge($generator, $this->options); |
254 | 254 | $generator = null; |
@@ -348,13 +348,13 @@ discard block |
||
348 | 348 | } |
349 | 349 | } else { |
350 | 350 | if ($array1[$key] != $array2[$key]) { |
351 | - $result[$key] = array( $array1[$key], $array2[$key]); |
|
351 | + $result[$key] = array($array1[$key], $array2[$key]); |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | if (!empty($subResult)) { |
355 | 355 | foreach ($subResult as $subKey => $subValue) { |
356 | 356 | if (!empty($subKey) && is_string($subKey)) { |
357 | - $result[$key . '.' . $subKey] = $subValue; |
|
357 | + $result[$key.'.'.$subKey] = $subValue; |
|
358 | 358 | } |
359 | 359 | } |
360 | 360 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | $adapter->setParams($params); |
83 | 83 | $paginator->setCurrentPageNumber($params->get('page', 1)) |
84 | - ->setItemCountPerPage($params->get('count', 10)); |
|
84 | + ->setItemCountPerPage($params->get('count', 10)); |
|
85 | 85 | |
86 | 86 | return $paginator; |
87 | 87 | } |
@@ -62,11 +62,11 @@ |
||
62 | 62 | $paginatorManager = $this->serviceManager->get('Core/PaginatorService'); |
63 | 63 | $paginator = $paginatorManager->get($paginatorName); |
64 | 64 | if (!isset($paginator) || !$paginator instanceof LaminasPaginator) { |
65 | - throw new \RuntimeException('Could not create paginator ' . $paginatorName); |
|
65 | + throw new \RuntimeException('Could not create paginator '.$paginatorName); |
|
66 | 66 | } |
67 | 67 | $adapter = $paginator->getAdapter(); |
68 | 68 | if (!isset($adapter) || !$adapter instanceof AdapterInterface) { |
69 | - throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter'); |
|
69 | + throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter'); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | $params = $usePostParams |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $response = new ViewModel(array('target' => $target)); |
87 | 87 | $response->setTemplate($template); |
88 | 88 | } |
89 | - $viewModel->addChild($response, $this->_captureTo . $i); |
|
89 | + $viewModel->addChild($response, $this->_captureTo.$i); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | return $viewModel; |