@@ -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; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $translator = $container->get('translator'); |
39 | 39 | |
40 | 40 | $notificationListener = $container->get('Core/Listener/Notification'); |
41 | - $notification = new Notification($flashMessenger); |
|
41 | + $notification = new Notification($flashMessenger); |
|
42 | 42 | $notification->setListener($notificationListener); |
43 | 43 | $notification->setTranslator($translator); |
44 | 44 |
@@ -25,13 +25,13 @@ |
||
25 | 25 | */ |
26 | 26 | class PaginatorServiceFactory implements FactoryInterface |
27 | 27 | { |
28 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
29 | - { |
|
30 | - $configArray = $container->get('Config'); |
|
31 | - $configArray = isset($configArray['paginator_manager']) ? $configArray['paginator_manager'] : array(); |
|
32 | - $config = new PaginatorServiceConfig($configArray); |
|
33 | - $service = new PaginatorService($container,$config->toArray()); |
|
28 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
29 | + { |
|
30 | + $configArray = $container->get('Config'); |
|
31 | + $configArray = isset($configArray['paginator_manager']) ? $configArray['paginator_manager'] : array(); |
|
32 | + $config = new PaginatorServiceConfig($configArray); |
|
33 | + $service = new PaginatorService($container,$config->toArray()); |
|
34 | 34 | |
35 | - return $service; |
|
36 | - } |
|
35 | + return $service; |
|
36 | + } |
|
37 | 37 | } |
@@ -25,12 +25,12 @@ |
||
25 | 25 | */ |
26 | 26 | class PaginatorServiceFactory implements FactoryInterface |
27 | 27 | { |
28 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
28 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
29 | 29 | { |
30 | 30 | $configArray = $container->get('Config'); |
31 | 31 | $configArray = isset($configArray['paginator_manager']) ? $configArray['paginator_manager'] : array(); |
32 | 32 | $config = new PaginatorServiceConfig($configArray); |
33 | - $service = new PaginatorService($container,$config->toArray()); |
|
33 | + $service = new PaginatorService($container, $config->toArray()); |
|
34 | 34 | |
35 | 35 | return $service; |
36 | 36 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | if (!$target) { |
92 | - $target = get_class($source) . 'Snapshot'; |
|
92 | + $target = get_class($source).'Snapshot'; |
|
93 | 93 | $target = new $target($source); |
94 | 94 | } |
95 | 95 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | $config['log'] = $log; |
73 | 73 | |
74 | - return new static($eventManager,$config); |
|
74 | + return new static($eventManager, $config); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | public function startDebug() |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** @var Logger $logger */ |
102 | 102 | $logger = Debugger::getLogger(); |
103 | 103 | $logger->emailSnooze = $config['email_snooze']; |
104 | - $logger->mailer = function ($message, $email) use ($logger) { |
|
104 | + $logger->mailer = function($message, $email) use ($logger) { |
|
105 | 105 | $exceptionFile = null; |
106 | 106 | |
107 | 107 | if ($message instanceof \Exception || $message instanceof \Throwable) { |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | while ($message) { |
111 | 111 | $tmp[] = ( |
112 | 112 | $message instanceof \ErrorException |
113 | - ? Helpers::errorTypeToString($message->getSeverity()) . ': ' . $message->getMessage() |
|
114 | - : Helpers::getClass($message) . ': ' . $message->getMessage() . ($message->getCode() ? ' #' . $message->getCode() : '') |
|
115 | - ) . ' in ' . $message->getFile() . ':' . $message->getLine(); |
|
113 | + ? Helpers::errorTypeToString($message->getSeverity()).': '.$message->getMessage() |
|
114 | + : Helpers::getClass($message).': '.$message->getMessage().($message->getCode() ? ' #'.$message->getCode() : '') |
|
115 | + ).' in '.$message->getFile().':'.$message->getLine(); |
|
116 | 116 | $message = $message->getPrevious(); |
117 | 117 | } |
118 | 118 | $message = implode("\ncaused by ", $tmp); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $host = preg_replace('#[^\w.-]+#', '', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : php_uname('n')); |
129 | 129 | $mimeMessage = new Mime\Message(); |
130 | 130 | |
131 | - $text = new Mime\Part($message . "\n\nsource: " . Helpers::getSource()); |
|
131 | + $text = new Mime\Part($message."\n\nsource: ".Helpers::getSource()); |
|
132 | 132 | $text->type = Mime\Mime::TYPE_TEXT; |
133 | 133 | $text->charset = 'utf-8'; |
134 | 134 | $mimeMessage->addPart($text); |
@@ -159,7 +159,7 @@ |
||
159 | 159 | : [ |
160 | 160 | 'description' => isset($result[2]) ? $result[2] : null, |
161 | 161 | 'viewScript' => isset($result[3]) ? $result[3] : null, |
162 | - ], |
|
162 | + ], |
|
163 | 163 | ]; |
164 | 164 | } |
165 | 165 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function setEventPrototype(EventInterface $prototype) |
36 | 36 | { |
37 | 37 | if (!$prototype instanceof DependencyResultEvent) { |
38 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
38 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | parent::setEventPrototype($prototype); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | protected function triggerListeners(EventInterface $event, callable $callback = null) |
56 | 56 | { |
57 | 57 | if (!$event instanceof DependencyResultEvent) { |
58 | - throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class); |
|
58 | + throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $results = parent::triggerListeners($event, $callback); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | use ZfListenerAggregateTrait; |
52 | 52 | |
53 | - public function attach(EventManagerInterface $events, $priority=1) |
|
53 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
54 | 54 | { |
55 | 55 | return $this->attachEvents($events); |
56 | 56 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $method = $spec[1]; |
90 | 90 | $priority = isset($spec[2]) ? $spec[2] : 0; |
91 | 91 | |
92 | - $this->listeners[] = $events->attach($event, [ $this, $method ], $priority); |
|
92 | + $this->listeners[] = $events->attach($event, [$this, $method], $priority); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return $this; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $this->prepareCheckboxes($box, $prefix); |
196 | 196 | } else { |
197 | 197 | /* @var $box Checkbox */ |
198 | - $box->setName($prefix . $box->getName()); |
|
198 | + $box->setName($prefix.$box->getName()); |
|
199 | 199 | } |
200 | 200 | } |
201 | 201 | } |
@@ -232,10 +232,10 @@ discard block |
||
232 | 232 | foreach ($form as $element) { |
233 | 233 | /* @var $element \Zend\Form\ElementInterface|DisableElementsCapableInterface|DisableCapableInterface */ |
234 | 234 | $name = $element->getName(); |
235 | - $elementName = $prefix . '[' . $element->getName() . ']'; |
|
235 | + $elementName = $prefix.'['.$element->getName().']'; |
|
236 | 236 | $options = $element->getOption('disable_capable'); |
237 | 237 | $boxOptions = array( |
238 | - 'long_label' => isset($options['label']) ? $options['label'] : ($element->getLabel() ? : $name), |
|
238 | + 'long_label' => isset($options['label']) ? $options['label'] : ($element->getLabel() ?: $name), |
|
239 | 239 | 'description' => isset($options['description']) ? $options['description'] |
240 | 240 | : 'Toggle availability of this element in the form.', |
241 | 241 | ); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $return[$name] = $this->buildCheckboxes($element, $elementName); |
246 | 246 | } |
247 | 247 | if ($element->isDisableCapable()) { |
248 | - $box = $this->createCheckbox($elementName . '[__all__]', $boxOptions); |
|
248 | + $box = $this->createCheckbox($elementName.'[__all__]', $boxOptions); |
|
249 | 249 | $box->setAttribute('checked', true); |
250 | 250 | $return[$name]['__all__'] = $box; |
251 | 251 | } |