@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @param ApplicationEvent $e |
70 | 70 | */ |
71 | 71 | public function prepareFormData(ApplicationEvent $e){ |
72 | - $target = $e->getTarget(); |
|
72 | + $target = $e->getTarget(); |
|
73 | 73 | if ($target->isPostRequest()) { |
74 | 74 | return; |
75 | 75 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @param ApplicationEvent $event |
124 | 124 | */ |
125 | 125 | public function sendMail(ApplicationEvent $event){ |
126 | - $event = $event->getTarget(); |
|
126 | + $event = $event->getTarget(); |
|
127 | 127 | if (!$event->isPostRequest()) { |
128 | 128 | return; |
129 | 129 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @param ApplicationEvent $e |
70 | 70 | */ |
71 | - public function prepareFormData(ApplicationEvent $e){ |
|
71 | + public function prepareFormData(ApplicationEvent $e) { |
|
72 | 72 | $target = $e->getTarget(); |
73 | 73 | if ($target->isPostRequest()) { |
74 | 74 | return; |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | $key = 'mailRejectionText'; |
97 | 97 | break; |
98 | 98 | default: |
99 | - throw new \InvalidArgumentException('Unknown status value: ' .$status); |
|
99 | + throw new \InvalidArgumentException('Unknown status value: '.$status); |
|
100 | 100 | } |
101 | - $mailText = $settings->$key ? $settings->$key : ''; |
|
101 | + $mailText = $settings->$key ? $settings->$key : ''; |
|
102 | 102 | $mail->setBody($mailText); |
103 | 103 | $mail->setApplication($this->application); |
104 | 104 | $mailText = $mail->getBodyText(); |
105 | - $mailSubject = sprintf( |
|
105 | + $mailSubject = sprintf( |
|
106 | 106 | $this->translator->translate('Your application dated %s'), |
107 | 107 | strftime('%x', $this->application->getDateCreated()->getTimestamp()) |
108 | 108 | ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * |
123 | 123 | * @param ApplicationEvent $event |
124 | 124 | */ |
125 | - public function sendMail(ApplicationEvent $event){ |
|
125 | + public function sendMail(ApplicationEvent $event) { |
|
126 | 126 | $event = $event->getTarget(); |
127 | 127 | if (!$event->isPostRequest()) { |
128 | 128 | return; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $this->mailService->send($mail); |
170 | 170 | |
171 | 171 | |
172 | - $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] ); |
|
172 | + $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]); |
|
173 | 173 | $this->application->changeStatus($status, $historyText); |
174 | 174 | $event->setNotification($historyText); |
175 | 175 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * |
181 | 181 | * @return AddressList |
182 | 182 | */ |
183 | - protected function getRecipient( Application $application, $status) { |
|
183 | + protected function getRecipient(Application $application, $status) { |
|
184 | 184 | |
185 | 185 | $recipient = Status::ACCEPTED == $status |
186 | 186 | ? $application->getJob()->getUser()->getInfo() |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $email = $recipient->getEmail(); |
190 | 190 | $name = $recipient->getDisplayName(false); |
191 | 191 | |
192 | - return $name ? [ $email => $name ] : [ $email ]; |
|
192 | + return $name ? [$email => $name] : [$email]; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | } |
196 | 196 | \ No newline at end of file |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $options = $options ?: $this->options; |
44 | 44 | $router = $container->get('Router'); |
45 | 45 | $options['router'] = $router; |
46 | - $this->setCreationOptions($options); |
|
46 | + $this->setCreationOptions($options); |
|
47 | 47 | $mail = new NewApplication($options); |
48 | 48 | |
49 | 49 | return $mail; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | $auth = $container->get('AuthenticationService'); |
31 | 31 | $user = $auth->getUser(); |
32 | 32 | $options['user'] = $user; |
33 | - $mail = new Confirmation($options); |
|
33 | + $mail = new Confirmation($options); |
|
34 | 34 | |
35 | 35 | return $mail; |
36 | 36 | } |
@@ -33,48 +33,48 @@ discard block |
||
33 | 33 | */ |
34 | 34 | class ConsoleController extends AbstractActionController |
35 | 35 | { |
36 | - /** |
|
37 | - * @var RepositoryService |
|
38 | - */ |
|
39 | - private $repositories; |
|
36 | + /** |
|
37 | + * @var RepositoryService |
|
38 | + */ |
|
39 | + private $repositories; |
|
40 | 40 | |
41 | - /** |
|
42 | - * @var FilterPluginManager |
|
43 | - */ |
|
44 | - private $filterManager; |
|
41 | + /** |
|
42 | + * @var FilterPluginManager |
|
43 | + */ |
|
44 | + private $filterManager; |
|
45 | 45 | |
46 | - /** |
|
47 | - * @var array |
|
48 | - */ |
|
49 | - private $config; |
|
46 | + /** |
|
47 | + * @var array |
|
48 | + */ |
|
49 | + private $config; |
|
50 | 50 | |
51 | - /** |
|
52 | - * @var DocumentManager |
|
53 | - */ |
|
54 | - private $documentManager; |
|
51 | + /** |
|
52 | + * @var DocumentManager |
|
53 | + */ |
|
54 | + private $documentManager; |
|
55 | 55 | |
56 | - public function __construct( |
|
57 | - RepositoryService $repositories, |
|
58 | - FilterPluginManager $filterManager, |
|
59 | - DocumentManager $documentManager, |
|
60 | - $config |
|
61 | - ) |
|
62 | - { |
|
63 | - $this->repositories = $repositories; |
|
64 | - $this->filterManager = $filterManager; |
|
65 | - $this->documentManager = $documentManager; |
|
66 | - $this->config = $config; |
|
67 | - } |
|
56 | + public function __construct( |
|
57 | + RepositoryService $repositories, |
|
58 | + FilterPluginManager $filterManager, |
|
59 | + DocumentManager $documentManager, |
|
60 | + $config |
|
61 | + ) |
|
62 | + { |
|
63 | + $this->repositories = $repositories; |
|
64 | + $this->filterManager = $filterManager; |
|
65 | + $this->documentManager = $documentManager; |
|
66 | + $this->config = $config; |
|
67 | + } |
|
68 | 68 | |
69 | - static public function factory(ContainerInterface $container) |
|
70 | - { |
|
71 | - return new self( |
|
72 | - $container->get('repositories'), |
|
73 | - $container->get('FilterManager'), |
|
74 | - $container->get('Core/DocumentManager'), |
|
75 | - $container->get('Config') |
|
76 | - ); |
|
77 | - } |
|
69 | + static public function factory(ContainerInterface $container) |
|
70 | + { |
|
71 | + return new self( |
|
72 | + $container->get('repositories'), |
|
73 | + $container->get('FilterManager'), |
|
74 | + $container->get('Core/DocumentManager'), |
|
75 | + $container->get('Config') |
|
76 | + ); |
|
77 | + } |
|
78 | 78 | |
79 | 79 | /** |
80 | 80 | * regenerate keywords for applications |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | $table = new Table( |
196 | 196 | array('columnWidths' => array(40, 40, 40), |
197 | - 'decorator' => 'ascii') |
|
197 | + 'decorator' => 'ascii') |
|
198 | 198 | ); |
199 | 199 | |
200 | 200 | $table->appendRow(array('Module', 'Name', 'Description')); |
@@ -275,8 +275,8 @@ discard block |
||
275 | 275 | $attachments = $app->getAttachments(); |
276 | 276 | foreach ($attachments as $attachment) { |
277 | 277 | $attachment->getPermissions() |
278 | - ->clear() |
|
279 | - ->inherit($permissions); |
|
278 | + ->clear() |
|
279 | + ->inherit($permissions); |
|
280 | 280 | } |
281 | 281 | $contact = $app->getContact(); |
282 | 282 | if ($contact) { |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | |
285 | 285 | if ($image) { |
286 | 286 | $image->getPermissions() |
287 | - ->clear() |
|
288 | - ->inherit($permissions); |
|
287 | + ->clear() |
|
288 | + ->inherit($permissions); |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | echo "Generate keywords for $count applications ...\n"; |
100 | 100 | |
101 | - $progress = new ProgressBar($count); |
|
101 | + $progress = new ProgressBar($count); |
|
102 | 102 | |
103 | 103 | /** @var \Core\Repository\Filter\PropertyToKeywords $filter */ |
104 | 104 | $filter = $this->filterManager->get('Core/Repository/PropertyToKeywords'); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | /** @var \Applications\Entity\Application $application */ |
108 | 108 | foreach ($applications as $application) { |
109 | - $progress->update($i++, 'Application ' . $i . ' / ' . $count); |
|
109 | + $progress->update($i++, 'Application '.$i.' / '.$count); |
|
110 | 110 | $keywords = $filter->filter($application); |
111 | 111 | |
112 | 112 | $application->setKeywords($keywords); |
@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | { |
133 | 133 | $applications = $this->fetchApplications(); |
134 | 134 | $count = count($applications); |
135 | - $i=0; |
|
136 | - echo "Calculate rating for " . $count . " applications ...\n"; |
|
135 | + $i = 0; |
|
136 | + echo "Calculate rating for ".$count." applications ...\n"; |
|
137 | 137 | |
138 | 138 | $progress = new ProgressBar($count); |
139 | 139 | /** @var \Applications\Entity\Application $application */ |
140 | 140 | foreach ($applications as $application) { |
141 | - $progress->update($i++, 'Application ' . $i . ' / ' . $count); |
|
141 | + $progress->update($i++, 'Application '.$i.' / '.$count); |
|
142 | 142 | $application->getRating(/* recalculate */ true); |
143 | 143 | } |
144 | 144 | $progress->update($i, 'Write to database...'); |
@@ -165,17 +165,17 @@ discard block |
||
165 | 165 | $documentManager = $this->documentManager; |
166 | 166 | |
167 | 167 | $count = count($applications); |
168 | - $i=0; |
|
168 | + $i = 0; |
|
169 | 169 | |
170 | - echo $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n"; |
|
170 | + echo $count." applications in Draft Mode and older than ".$days." days will be deleted\n"; |
|
171 | 171 | |
172 | 172 | $progress = new ProgressBar($count); |
173 | 173 | |
174 | 174 | foreach ($applications as $application) { |
175 | - $progress->update($i++, 'Application ' . $i . ' / ' . $count); |
|
175 | + $progress->update($i++, 'Application '.$i.' / '.$count); |
|
176 | 176 | try { |
177 | 177 | $documentManager->remove($application); |
178 | - } catch (\Exception $e){ |
|
178 | + } catch (\Exception $e) { |
|
179 | 179 | // log something |
180 | 180 | $e->getCode(); |
181 | 181 | } |
@@ -199,17 +199,17 @@ discard block |
||
199 | 199 | |
200 | 200 | $table->appendRow(array('Module', 'Name', 'Description')); |
201 | 201 | |
202 | - $offset=strlen(getcwd())+1; |
|
203 | - $links=""; |
|
204 | - $github='https://github.com/cross-solution/YAWIK/blob/master/'; |
|
202 | + $offset = strlen(getcwd()) + 1; |
|
203 | + $links = ""; |
|
204 | + $github = 'https://github.com/cross-solution/YAWIK/blob/master/'; |
|
205 | 205 | |
206 | 206 | foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) { |
207 | 207 | // strip the application_root plus an additional slash |
208 | - $filename=substr(realpath($absolute_filename), $offset); |
|
208 | + $filename = substr(realpath($absolute_filename), $offset); |
|
209 | 209 | if (preg_match('~module/([^/]+)~', $filename, $match)) { |
210 | - $module=$match[1]; |
|
210 | + $module = $match[1]; |
|
211 | 211 | } else { |
212 | - $module="not found ($key)"; |
|
212 | + $module = "not found ($key)"; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | $viewModel = new ViewModel(); |
@@ -218,17 +218,17 @@ discard block |
||
218 | 218 | $row = new Row(); |
219 | 219 | $row->appendColumn(new Column($module)); |
220 | 220 | if ($filename) { |
221 | - $row->appendColumn(new Column('`' . $key . '`_')); |
|
222 | - $links.='.. _'. $key .': '. $github.$filename .PHP_EOL; |
|
221 | + $row->appendColumn(new Column('`'.$key.'`_')); |
|
222 | + $links .= '.. _'.$key.': '.$github.$filename.PHP_EOL; |
|
223 | 223 | } else { |
224 | 224 | $row->appendColumn(new Column("WRONG CONFIGURATION")); |
225 | 225 | } |
226 | - $comment=""; |
|
226 | + $comment = ""; |
|
227 | 227 | if (file_exists($absolute_filename)) { |
228 | - $src=file_get_contents($absolute_filename); |
|
229 | - $comment="file exists"; |
|
228 | + $src = file_get_contents($absolute_filename); |
|
229 | + $comment = "file exists"; |
|
230 | 230 | if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) { |
231 | - $comment=$match['1']; |
|
231 | + $comment = $match['1']; |
|
232 | 232 | } |
233 | 233 | } |
234 | 234 | $row->appendColumn(new Column($comment)); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | { |
246 | 246 | echo "Loading applications... "; |
247 | 247 | |
248 | - $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY); |
|
248 | + $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY); |
|
249 | 249 | $filter['$or'] = array( |
250 | 250 | array('attachments' => array('$exists' => 1)), |
251 | 251 | array('contact.image' => array('$exists' => 1)), |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | return; |
260 | 260 | } |
261 | 261 | $progress = new ProgressBar($count); |
262 | - $i=0; |
|
262 | + $i = 0; |
|
263 | 263 | |
264 | 264 | foreach ($applications as $app) { |
265 | 265 | $progress->update($i++, "Process $i / $count"); |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | |
61 | 61 | protected $viewHelper; |
62 | 62 | |
63 | - /** |
|
64 | - * @param ContainerInterface $container |
|
65 | - * |
|
66 | - * @return ApplyController |
|
67 | - */ |
|
63 | + /** |
|
64 | + * @param ContainerInterface $container |
|
65 | + * |
|
66 | + * @return ApplyController |
|
67 | + */ |
|
68 | 68 | static public function factory(ContainerInterface $container) |
69 | 69 | { |
70 | 70 | $ob = new self(); |
@@ -72,24 +72,24 @@ discard block |
||
72 | 72 | return $ob; |
73 | 73 | } |
74 | 74 | |
75 | - public function setContainer( ContainerInterface $container ) |
|
76 | - { |
|
77 | - $this->config = $container->get('Config'); |
|
78 | - $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
79 | - $this->validator = $container->get('ValidatorManager'); |
|
80 | - $this->repositories = $container->get('repositories'); |
|
81 | - $this->appEvents = $container->get('Applications/Events'); |
|
82 | - $this->viewHelper = $container->get('ViewHelperManager'); |
|
83 | - } |
|
75 | + public function setContainer( ContainerInterface $container ) |
|
76 | + { |
|
77 | + $this->config = $container->get('Config'); |
|
78 | + $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
79 | + $this->validator = $container->get('ValidatorManager'); |
|
80 | + $this->repositories = $container->get('repositories'); |
|
81 | + $this->appEvents = $container->get('Applications/Events'); |
|
82 | + $this->viewHelper = $container->get('ViewHelperManager'); |
|
83 | + } |
|
84 | 84 | |
85 | 85 | |
86 | - public function attachDefaultListeners() |
|
87 | - { |
|
88 | - parent::attachDefaultListeners(); |
|
89 | - $events = $this->getEventManager(); |
|
90 | - $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10); |
|
91 | - return $this; |
|
92 | - } |
|
86 | + public function attachDefaultListeners() |
|
87 | + { |
|
88 | + parent::attachDefaultListeners(); |
|
89 | + $events = $this->getEventManager(); |
|
90 | + $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10); |
|
91 | + return $this; |
|
92 | + } |
|
93 | 93 | |
94 | 94 | public function preDispatch(MvcEvent $e) |
95 | 95 | { |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | ->getHybridAuth(); |
267 | 267 | /* @var $authProfile \Hybrid_User_Profile */ |
268 | 268 | $authProfile = $hybridAuth->authenticate($network) |
269 | - ->getUserProfile(); |
|
269 | + ->getUserProfile(); |
|
270 | 270 | |
271 | 271 | /* @var \Auth\Entity\SocialProfiles\AbstractProfile $profile */ |
272 | 272 | $profile = $this->plugin('Auth/SocialProfiles')->fetch($network); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | return $this->redirect() |
322 | - ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
322 | + ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | public function processPreviewAction() |
@@ -329,11 +329,11 @@ discard block |
||
329 | 329 | |
330 | 330 | public function processAction() |
331 | 331 | { |
332 | - $params = $this->params(); |
|
332 | + $params = $this->params(); |
|
333 | 333 | $formName = $params->fromQuery('form'); |
334 | 334 | $form = $this->formContainer->getForm($formName); |
335 | 335 | $postData = $form->getOption('use_post_array') ? $params->fromPost() : array(); |
336 | - //@TODO: [ZF3] option use_files_array is false by default |
|
336 | + //@TODO: [ZF3] option use_files_array is false by default |
|
337 | 337 | //$filesData = $form->getOption('use_files_array') ? $params->fromFiles() : array(); |
338 | 338 | $form->setData(array_merge($postData,$_FILES)); |
339 | 339 | |
@@ -363,9 +363,9 @@ discard block |
||
363 | 363 | |
364 | 364 | return new JsonModel( |
365 | 365 | array( |
366 | - 'valid' => $form->isValid(), |
|
367 | - 'content' => $content, |
|
368 | - 'isApplicationValid' => $this->checkApplication($application) |
|
366 | + 'valid' => $form->isValid(), |
|
367 | + 'content' => $content, |
|
368 | + 'isApplicationValid' => $this->checkApplication($application) |
|
369 | 369 | ) |
370 | 370 | ); |
371 | 371 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | return $ob; |
73 | 73 | } |
74 | 74 | |
75 | - public function setContainer( ContainerInterface $container ) |
|
75 | + public function setContainer(ContainerInterface $container) |
|
76 | 76 | { |
77 | 77 | $this->config = $container->get('Config'); |
78 | 78 | $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | throw new \RuntimeException('Invalid application id.'); |
126 | 126 | } |
127 | 127 | |
128 | - $action = 'process'; |
|
128 | + $action = 'process'; |
|
129 | 129 | |
130 | 130 | $routeMatch->setParam('action', $action); |
131 | 131 | } else { |
@@ -209,14 +209,14 @@ discard block |
||
209 | 209 | |
210 | 210 | $container->setEntity($application); |
211 | 211 | $this->configureContainer($container); |
212 | - $this->formContainer = $container; |
|
212 | + $this->formContainer = $container; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | public function jobNotFoundAction() |
216 | 216 | { |
217 | 217 | $this->response->setStatusCode(410); |
218 | 218 | $model = new ViewModel( |
219 | - [ 'content' => /*@translate*/ 'Invalid apply id'] |
|
219 | + ['content' => /*@translate*/ 'Invalid apply id'] |
|
220 | 220 | ); |
221 | 221 | $model->setTemplate('applications/error/not-found'); |
222 | 222 | return $model; |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $postData = $form->getOption('use_post_array') ? $params->fromPost() : array(); |
336 | 336 | //@TODO: [ZF3] option use_files_array is false by default |
337 | 337 | //$filesData = $form->getOption('use_files_array') ? $params->fromFiles() : array(); |
338 | - $form->setData(array_merge($postData,$_FILES)); |
|
338 | + $form->setData(array_merge($postData, $_FILES)); |
|
339 | 339 | |
340 | 340 | if (!$form->isValid()) { |
341 | 341 | return new JsonModel( |
@@ -397,13 +397,13 @@ discard block |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | if ('previewmail' == $this->params()->fromQuery('do')) { |
400 | - $this->mailer('Applications/CarbonCopy', [ 'application' => $application], true); |
|
400 | + $this->mailer('Applications/CarbonCopy', ['application' => $application], true); |
|
401 | 401 | $this->notification()->success(/*@translate*/ 'Mail has been send'); |
402 | 402 | return new JsonModel(); |
403 | 403 | } |
404 | 404 | |
405 | 405 | if ('sendmail' == $this->params()->fromQuery('do')) { |
406 | - $jobEntity = $application->getJob(); |
|
406 | + $jobEntity = $application->getJob(); |
|
407 | 407 | |
408 | 408 | $mailData = array( |
409 | 409 | 'application' => $application, |
@@ -434,8 +434,8 @@ discard block |
||
434 | 434 | |
435 | 435 | $repositories->store($application); |
436 | 436 | |
437 | - $events = $this->appEvents; |
|
438 | - $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, [ 'application' => $application ]); |
|
437 | + $events = $this->appEvents; |
|
438 | + $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, ['application' => $application]); |
|
439 | 439 | |
440 | 440 | $model = new ViewModel( |
441 | 441 | array( |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | class CommentController extends AbstractActionController implements ContainerAwareInterface |
27 | 27 | { |
28 | - private $repositories; |
|
28 | + private $repositories; |
|
29 | 29 | |
30 | - private $formManager; |
|
30 | + private $formManager; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Lists comments of an application |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $application->getComments()->add($comment); |
84 | 84 | $application->changeStatus($application->getStatus(), sprintf( |
85 | 85 | /* @translate */ 'Application was rated by %s', |
86 | - $this->auth()->getUser()->getInfo()->getDisplayName()) |
|
86 | + $this->auth()->getUser()->getInfo()->getDisplayName()) |
|
87 | 87 | ); |
88 | 88 | } |
89 | 89 | $viewModel->setVariable('isSaved', true); |
@@ -100,18 +100,18 @@ discard block |
||
100 | 100 | return $viewModel; |
101 | 101 | } |
102 | 102 | |
103 | - public function setContainer( ContainerInterface $container ) |
|
104 | - { |
|
105 | - $this->repositories = $container->get('repositories'); |
|
106 | - $this->formManager = $container->get('forms'); |
|
107 | - } |
|
103 | + public function setContainer( ContainerInterface $container ) |
|
104 | + { |
|
105 | + $this->repositories = $container->get('repositories'); |
|
106 | + $this->formManager = $container->get('forms'); |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * @param ContainerInterface $container |
|
111 | - * |
|
112 | - * @return CommentController |
|
113 | - */ |
|
114 | - static public function factory(ContainerInterface $container) |
|
109 | + /** |
|
110 | + * @param ContainerInterface $container |
|
111 | + * |
|
112 | + * @return CommentController |
|
113 | + */ |
|
114 | + static public function factory(ContainerInterface $container) |
|
115 | 115 | { |
116 | 116 | $ob = new self(); |
117 | 117 | $ob->setContainer($container); |
@@ -100,7 +100,7 @@ |
||
100 | 100 | return $viewModel; |
101 | 101 | } |
102 | 102 | |
103 | - public function setContainer( ContainerInterface $container ) |
|
103 | + public function setContainer(ContainerInterface $container) |
|
104 | 104 | { |
105 | 105 | $this->repositories = $container->get('repositories'); |
106 | 106 | $this->formManager = $container->get('forms'); |
@@ -115,27 +115,27 @@ |
||
115 | 115 | */ |
116 | 116 | protected function generateHtml() |
117 | 117 | { |
118 | - /* |
|
118 | + /* |
|
119 | 119 | * "ViewHelperManager" defined by ZF2 |
120 | 120 | * see http://framework.zend.com/manual/2.0/en/modules/zend.mvc.services.html#viewmanager |
121 | 121 | */ |
122 | - $viewManager = $this->viewManager; |
|
122 | + $viewManager = $this->viewManager; |
|
123 | 123 | |
124 | 124 | return $viewManager->get("partial")->__invoke('applications/mail/forward', array("application"=>$this->application)); |
125 | 125 | } |
126 | 126 | |
127 | 127 | public function setContainer(ContainerInterface $container) |
128 | 128 | { |
129 | - $this->viewManager = $container->get('ViewHelperManager'); |
|
129 | + $this->viewManager = $container->get('ViewHelperManager'); |
|
130 | 130 | } |
131 | 131 | |
132 | - /** |
|
133 | - * @param ContainerInterface $container |
|
134 | - * @param $requestedName |
|
135 | - * @param array $options |
|
136 | - * |
|
137 | - * @return Forward |
|
138 | - */ |
|
132 | + /** |
|
133 | + * @param ContainerInterface $container |
|
134 | + * @param $requestedName |
|
135 | + * @param array $options |
|
136 | + * |
|
137 | + * @return Forward |
|
138 | + */ |
|
139 | 139 | static public function factory(ContainerInterface $container,$requestedName,array $options=[]) |
140 | 140 | { |
141 | 141 | $ob = new self($options); |
@@ -136,7 +136,7 @@ |
||
136 | 136 | * |
137 | 137 | * @return Forward |
138 | 138 | */ |
139 | - static public function factory(ContainerInterface $container,$requestedName,array $options=[]) |
|
139 | + static public function factory(ContainerInterface $container, $requestedName, array $options = []) |
|
140 | 140 | { |
141 | 141 | $ob = new self($options); |
142 | 142 | $ob->setContainer($container); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | use Zend\ServiceManager\Factory\InvokableFactory; |
17 | 17 | |
18 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
18 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
19 | 19 | |
20 | 20 | |
21 | 21 | return array( |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | 'doctrine' => $doctrineConfig, |
24 | 24 | |
25 | 25 | 'options' => [ |
26 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
26 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
27 | 27 | ], |
28 | 28 | |
29 | 29 | 'Core' => array( |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'name' => 'stream', |
44 | 44 | 'priority' => 1000, |
45 | 45 | 'options' => array( |
46 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
46 | + 'stream' => __DIR__.'/../../../log/yawik.log', |
|
47 | 47 | ), |
48 | 48 | ), |
49 | 49 | ), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'name' => 'stream', |
55 | 55 | 'priority' => 1000, |
56 | 56 | 'options' => array( |
57 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
57 | + 'stream' => __DIR__.'/../../../log/mails.log', |
|
58 | 58 | ), |
59 | 59 | ), |
60 | 60 | ), |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array |
72 | 72 | 'bar' => false, // bool = enabled|Toggle nette diagnostics bar. |
73 | 73 | 'strict' => true, // bool = cause immediate death|int = matched against error severity |
74 | - 'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
74 | + 'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
75 | 75 | 'email' => null, // in production mode notifies the recipient |
76 | 76 | 'email_snooze' => 900 // interval for sending email in seconds |
77 | 77 | ], |
@@ -198,17 +198,17 @@ discard block |
||
198 | 198 | 'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory', |
199 | 199 | 'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory', |
200 | 200 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
201 | - 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'], |
|
202 | - 'DefaultListeners' => ['Core\Listener\DefaultListener','factory'], |
|
203 | - 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'], |
|
204 | - 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'], |
|
201 | + 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'], |
|
202 | + 'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'], |
|
203 | + 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'], |
|
204 | + 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'], |
|
205 | 205 | 'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory', |
206 | 206 | 'Core/Locale' => 'Core\I18n\LocaleFactory', |
207 | 207 | 'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class, |
208 | 208 | \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class, |
209 | 209 | \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class, |
210 | 210 | 'Imagine' => \Core\Factory\Service\ImagineFactory::class, |
211 | - 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'], |
|
211 | + 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'], |
|
212 | 212 | ), |
213 | 213 | 'abstract_factories' => array( |
214 | 214 | 'Core\Factory\OptionsAbstractFactory', |
@@ -230,17 +230,17 @@ discard block |
||
230 | 230 | 'translation_file_patterns' => array( |
231 | 231 | [ |
232 | 232 | 'type' => 'gettext', |
233 | - 'base_dir' => __DIR__ . '/../language', |
|
233 | + 'base_dir' => __DIR__.'/../language', |
|
234 | 234 | 'pattern' => '%s.mo', |
235 | 235 | ], |
236 | 236 | [ |
237 | 237 | 'type' => 'phparray', |
238 | - 'base_dir' => __DIR__ . '/../language', |
|
238 | + 'base_dir' => __DIR__.'/../language', |
|
239 | 239 | 'pattern' => 'Zend_Validate.%s.php', |
240 | 240 | ], |
241 | 241 | [ |
242 | 242 | 'type' => 'phparray', |
243 | - 'base_dir' => __DIR__ . '/../language', |
|
243 | + 'base_dir' => __DIR__.'/../language', |
|
244 | 244 | 'pattern' => 'Zend_Captcha.%s.php', |
245 | 245 | ] |
246 | 246 | ), |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | ), |
269 | 269 | 'factories' => [ |
270 | 270 | // @TODO: improve this factory |
271 | - 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | - 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | - 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
271 | + 'Core\Controller\Index' => [\Core\Controller\IndexController::class, 'factory'], |
|
272 | + 'Core/Admin' => [\Core\Controller\AdminController::class, 'factory'], |
|
273 | + 'Core\Controller\File' => [\Core\Controller\FileController::class, 'factory'], |
|
274 | 274 | ], |
275 | 275 | 'abstract_factories' => [ |
276 | 276 | \Core\Factory\Controller\LazyControllerFactory::class |
@@ -285,9 +285,9 @@ discard block |
||
285 | 285 | 'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory', |
286 | 286 | 'listquery' => 'Core\Controller\Plugin\ListQuery::factory', |
287 | 287 | 'mail' => 'Core\Controller\Plugin\Mail::factory', |
288 | - 'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'], |
|
289 | - 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'], |
|
290 | - 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'], |
|
288 | + 'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'], |
|
289 | + 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'], |
|
290 | + 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'], |
|
291 | 291 | ), |
292 | 292 | 'invokables' => array( |
293 | 293 | 'Core/FileSender' => 'Core\Controller\Plugin\FileSender', |
@@ -317,32 +317,32 @@ discard block |
||
317 | 317 | 'exception_template' => 'error/index', |
318 | 318 | // Map template to files. Speeds up the lookup through the template stack. |
319 | 319 | 'template_map' => array( |
320 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
321 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
322 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
323 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
324 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
325 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
326 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
327 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
328 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
329 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
330 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
331 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
332 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
333 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
334 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
335 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
336 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
337 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
338 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
339 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
340 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
320 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
321 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
322 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
323 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
324 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
325 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
326 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
327 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
328 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
329 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
330 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
331 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
332 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
333 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
334 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
335 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
336 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
337 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
338 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
339 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
340 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
341 | 341 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
342 | 342 | ), |
343 | 343 | // Where to look for view templates not mapped above |
344 | 344 | 'template_path_stack' => array( |
345 | - __DIR__ . '/../view', |
|
345 | + __DIR__.'/../view', |
|
346 | 346 | ), |
347 | 347 | ), |
348 | 348 | 'view_helpers' => array( |
@@ -39,24 +39,24 @@ discard block |
||
39 | 39 | 'log' => array( |
40 | 40 | 'Core/Log' => array( |
41 | 41 | 'writers' => array( |
42 | - array( |
|
43 | - 'name' => 'stream', |
|
42 | + array( |
|
43 | + 'name' => 'stream', |
|
44 | 44 | 'priority' => 1000, |
45 | 45 | 'options' => array( |
46 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
46 | + 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
47 | + ), |
|
47 | 48 | ), |
48 | - ), |
|
49 | 49 | ), |
50 | 50 | ), |
51 | 51 | 'Log/Core/Mail' => array( |
52 | 52 | 'writers' => array( |
53 | - array( |
|
54 | - 'name' => 'stream', |
|
53 | + array( |
|
54 | + 'name' => 'stream', |
|
55 | 55 | 'priority' => 1000, |
56 | 56 | 'options' => array( |
57 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
57 | + 'stream' => __DIR__ .'/../../../log/mails.log', |
|
58 | + ), |
|
58 | 59 | ), |
59 | - ), |
|
60 | 60 | ), |
61 | 61 | ), |
62 | 62 | ), |
@@ -248,17 +248,17 @@ discard block |
||
248 | 248 | // Defines the Core/Navigation. |
249 | 249 | 'navigation' => array( |
250 | 250 | 'default' => array( |
251 | - 'home' => array( |
|
252 | - 'label' => /*@translate*/ 'Home', |
|
253 | - 'route' => 'lang', |
|
254 | - 'visible' => false |
|
255 | - ), |
|
256 | - 'admin' => array( |
|
257 | - 'label ' => /*@translate*/ 'Admin', |
|
258 | - 'route' => 'lang/admin', |
|
259 | - 'resource' => 'route/lang/admin', |
|
260 | - 'order' => 200, |
|
261 | - ), |
|
251 | + 'home' => array( |
|
252 | + 'label' => /*@translate*/ 'Home', |
|
253 | + 'route' => 'lang', |
|
254 | + 'visible' => false |
|
255 | + ), |
|
256 | + 'admin' => array( |
|
257 | + 'label ' => /*@translate*/ 'Admin', |
|
258 | + 'route' => 'lang/admin', |
|
259 | + 'resource' => 'route/lang/admin', |
|
260 | + 'order' => 200, |
|
261 | + ), |
|
262 | 262 | ), |
263 | 263 | ), |
264 | 264 | // Configuration of the controller service manager (Which loads controllers) |
@@ -266,14 +266,14 @@ discard block |
||
266 | 266 | 'invokables' => array( |
267 | 267 | 'Core\Controller\Content' => 'Core\Controller\ContentController', |
268 | 268 | ), |
269 | - 'factories' => [ |
|
270 | - // @TODO: improve this factory |
|
271 | - 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | - 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | - 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
274 | - ], |
|
269 | + 'factories' => [ |
|
270 | + // @TODO: improve this factory |
|
271 | + 'Core\Controller\Index' => [\Core\Controller\IndexController::class,'factory'], |
|
272 | + 'Core/Admin' => [\Core\Controller\AdminController::class,'factory'], |
|
273 | + 'Core\Controller\File' => [\Core\Controller\FileController::class,'factory'], |
|
274 | + ], |
|
275 | 275 | 'abstract_factories' => [ |
276 | - \Core\Factory\Controller\LazyControllerFactory::class |
|
276 | + \Core\Factory\Controller\LazyControllerFactory::class |
|
277 | 277 | ], |
278 | 278 | ), |
279 | 279 | // Configuration of the controller plugin service manager |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | 'paginatorservice' => 'Core/PaginatorService', |
305 | 305 | 'paginationParams' => 'Core/PaginationParams', |
306 | 306 | 'searchform' => 'Core/SearchForm', |
307 | - 'notification' => 'Notification', |
|
307 | + 'notification' => 'Notification', |
|
308 | 308 | ) |
309 | 309 | ), |
310 | 310 | // Configure the view service manager |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | ), |
403 | 403 | 'aliases' => [ |
404 | 404 | 'snippet' => \Core\View\Helper\Snippet::class, |
405 | - 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
405 | + 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
406 | 406 | 'proxy' => \Core\View\Helper\Proxy::class, |
407 | 407 | 'form_element' => 'formElement', |
408 | 408 | ], |
@@ -500,17 +500,17 @@ discard block |
||
500 | 500 | ], |
501 | 501 | |
502 | 502 | 'Core/Ajax/Events' => [ |
503 | - 'service' => 'Core/EventManager', |
|
504 | - 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
503 | + 'service' => 'Core/EventManager', |
|
504 | + 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
505 | 505 | ], |
506 | 506 | |
507 | - 'Core/File/Events' => [ |
|
508 | - 'service' => 'Core/EventManager', |
|
509 | - 'event' => \Core\Listener\Events\FileEvent::class, |
|
507 | + 'Core/File/Events' => [ |
|
508 | + 'service' => 'Core/EventManager', |
|
509 | + 'event' => \Core\Listener\Events\FileEvent::class, |
|
510 | 510 | 'listeners' => [ |
511 | 511 | \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000], |
512 | 512 | ], |
513 | - ] |
|
513 | + ] |
|
514 | 514 | ], |
515 | 515 | |
516 | 516 | ); |
@@ -112,16 +112,16 @@ |
||
112 | 112 | $eventManager->attach( |
113 | 113 | MvcEvent::EVENT_DISPATCH_ERROR, |
114 | 114 | function ($event) { |
115 | - if($event instanceof MvcEvent){ |
|
116 | - $application = $event->getApplication(); |
|
115 | + if($event instanceof MvcEvent){ |
|
116 | + $application = $event->getApplication(); |
|
117 | 117 | |
118 | - if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | - $ex = $event->getParam('exception'); |
|
120 | - if (404 == $ex->getCode()) { |
|
121 | - $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | - } |
|
123 | - } |
|
124 | - } |
|
118 | + if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | + $ex = $event->getParam('exception'); |
|
120 | + if (404 == $ex->getCode()) { |
|
121 | + $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | + } |
|
123 | + } |
|
124 | + } |
|
125 | 125 | }, |
126 | 126 | 500 |
127 | 127 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function getConsoleBanner(Console $console) |
42 | 42 | { |
43 | 43 | $version = `git describe 2>/dev/null`; |
44 | - $name = 'YAWIK ' . trim($version); |
|
44 | + $name = 'YAWIK '.trim($version); |
|
45 | 45 | $width = $console->getWidth(); |
46 | 46 | return sprintf( |
47 | 47 | "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n", |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | |
112 | 112 | $eventManager->attach( |
113 | 113 | MvcEvent::EVENT_DISPATCH_ERROR, |
114 | - function ($event) { |
|
115 | - if($event instanceof MvcEvent){ |
|
114 | + function($event) { |
|
115 | + if ($event instanceof MvcEvent) { |
|
116 | 116 | $application = $event->getApplication(); |
117 | 117 | |
118 | 118 | if ($application::ERROR_EXCEPTION == $event->getError()) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ); |
128 | 128 | $eventManager->attach( |
129 | 129 | MvcEvent::EVENT_DISPATCH, |
130 | - function ($event) use ($eventManager) { |
|
130 | + function($event) use ($eventManager) { |
|
131 | 131 | $eventManager->trigger('postDispatch', $event); |
132 | 132 | }, |
133 | 133 | -150 |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function getConfig() |
144 | 144 | { |
145 | - $config = include __DIR__ . '/config/module.config.php'; |
|
145 | + $config = include __DIR__.'/config/module.config.php'; |
|
146 | 146 | return $config; |
147 | 147 | } |
148 | 148 | |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | { |
156 | 156 | return array( |
157 | 157 | 'Zend\Loader\ClassMapAutoloader' => [ |
158 | - __DIR__ . '/src/autoload_classmap.php' |
|
158 | + __DIR__.'/src/autoload_classmap.php' |
|
159 | 159 | ], |
160 | 160 | 'Zend\Loader\StandardAutoloader' => array( |
161 | 161 | 'namespaces' => array( |
162 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
163 | - 'CoreTest' => __DIR__ . '/test/' . 'CoreTest', |
|
164 | - 'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils', |
|
162 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
163 | + 'CoreTest' => __DIR__.'/test/'.'CoreTest', |
|
164 | + 'CoreTestUtils' => __DIR__.'/test/CoreTestUtils', |
|
165 | 165 | ), |
166 | 166 | ), |
167 | 167 | ); |