@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function getConsoleBanner(Console $console) |
37 | 37 | { |
38 | 38 | $version = `git describe 2>/dev/null`; |
39 | - $name = 'YAWIK ' . trim($version); |
|
39 | + $name = 'YAWIK '.trim($version); |
|
40 | 40 | $width = $console->getWidth(); |
41 | 41 | return sprintf( |
42 | 42 | "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n", |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $sharedManager = $eventManager->getSharedManager(); |
73 | 73 | |
74 | 74 | if (!\Zend\Console\Console::isConsole()) { |
75 | - $redirectCallback = function () use ($e) { |
|
75 | + $redirectCallback = function() use ($e) { |
|
76 | 76 | $routeMatch = $e->getRouteMatch(); |
77 | 77 | $lang = $routeMatch ? $routeMatch->getParam('lang', 'en') : 'en'; |
78 | - $uri = $e->getRouter()->getBaseUrl() . '/' . $lang . '/error'; |
|
78 | + $uri = $e->getRouter()->getBaseUrl().'/'.$lang.'/error'; |
|
79 | 79 | |
80 | - header('Location: ' . $uri); |
|
80 | + header('Location: '.$uri); |
|
81 | 81 | }; |
82 | 82 | |
83 | 83 | $errorHandlerListener = new ErrorHandlerListener($sm->get('ErrorLogger'), $redirectCallback); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $eventManager->attach( |
111 | 111 | MvcEvent::EVENT_DISPATCH_ERROR, |
112 | - function ($event) { |
|
112 | + function($event) { |
|
113 | 113 | $application = $event->getApplication(); |
114 | 114 | if ($application::ERROR_EXCEPTION == $event->getError()) { |
115 | 115 | $ex = $event->getParam('exception'); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ); |
124 | 124 | $eventManager->attach( |
125 | 125 | MvcEvent::EVENT_DISPATCH, |
126 | - function ($event) use ($eventManager) { |
|
126 | + function($event) use ($eventManager) { |
|
127 | 127 | $eventManager->trigger('postDispatch', $event); |
128 | 128 | }, |
129 | 129 | -150 |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getConfig() |
140 | 140 | { |
141 | - $config = include __DIR__ . '/config/module.config.php'; |
|
141 | + $config = include __DIR__.'/config/module.config.php'; |
|
142 | 142 | return $config; |
143 | 143 | if (\Zend\Console\Console::isConsole()) { |
144 | 144 | $config['doctrine']['configuration']['odm_default']['generate_proxies'] = false; |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | return array( |
159 | 159 | 'Zend\Loader\StandardAutoloader' => array( |
160 | 160 | 'namespaces' => array( |
161 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
162 | - 'CoreTest' => __DIR__ . '/test/' . 'CoreTest', |
|
163 | - 'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils', |
|
161 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
162 | + 'CoreTest' => __DIR__.'/test/'.'CoreTest', |
|
163 | + 'CoreTestUtils' => __DIR__.'/test/CoreTestUtils', |
|
164 | 164 | ), |
165 | 165 | ), |
166 | 166 | ); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $defaults = [ |
149 | 149 | 'service' => 'EventManager', |
150 | 150 | 'configure' => true, |
151 | - 'identifiers' => [ $name ], |
|
151 | + 'identifiers' => [$name], |
|
152 | 152 | 'event' => '\Zend\EventManager\Event', |
153 | 153 | 'listeners' => [], |
154 | 154 | ]; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | foreach ($listeners as $name => $options) { |
240 | 240 | $options = $this->normalizeListenerOptions($name, $options); |
241 | 241 | |
242 | - if ($options['lazy'] && null !== $options['attach'] ) { |
|
242 | + if ($options['lazy'] && null !== $options['attach']) { |
|
243 | 243 | foreach ($options['attach'] as $spec) { |
244 | 244 | $lazyListeners[] = [ |
245 | 245 | 'service' => $options['service'], |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | |
271 | 271 | foreach ($options['attach'] as $spec) { |
272 | - $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener; |
|
272 | + $callback = $spec['method'] ? [$listener, $spec['method']] : $listener; |
|
273 | 273 | $eventManager->attach($spec['events'], $callback, $spec['priority']); |
274 | 274 | } |
275 | 275 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | if (is_string($options)) { |
342 | 342 | /* Only an event name is provided in config */ |
343 | - $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ]; |
|
343 | + $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]]; |
|
344 | 344 | return $normalized; |
345 | 345 | |
346 | 346 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } else if (is_string($opt)) { |
370 | 370 | if (null === $event) { |
371 | 371 | /* first string found is assumed to be the event name */ |
372 | - $event = [ $opt ]; |
|
372 | + $event = [$opt]; |
|
373 | 373 | } else { |
374 | 374 | /* second string found must be a method name. */ |
375 | 375 | $method = $opt; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | } |
387 | 387 | |
388 | - $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ]; |
|
388 | + $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]]; |
|
389 | 389 | $normalized['lazy'] = $lazy; |
390 | 390 | |
391 | 391 | return $normalized; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | protected function normalizeEventsSpec($options) |
395 | 395 | { |
396 | 396 | $listenerPriority = isset($options['priority']) ? $options['priority'] : 0; |
397 | - $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
397 | + $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
398 | 398 | $events = []; |
399 | 399 | |
400 | 400 | foreach ($options['events'] as $event => $spec) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } else if (is_array($spec)) { |
415 | 415 | if (isset($spec['method'])) { |
416 | 416 | if (!is_array($spec['method'])) { |
417 | - $spec['method'] = [ $spec['method'] ]; |
|
417 | + $spec['method'] = [$spec['method']]; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | foreach ($spec['method'] as $method => $methodPriority) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param bool $acceptApplicationByDepartmentManager |
18 | 18 | * @return WorkflowSettings |
19 | 19 | */ |
20 | - public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager ); |
|
20 | + public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Gets AcceptApplicationByDepartmentManager |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param bool $assignDepartmentManagersToJobs |
33 | 33 | * @return WorkflowSettings |
34 | 34 | */ |
35 | - public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs ); |
|
35 | + public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs); |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Gets AssignDepartmentManagersToJobs |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | * @param bool $acceptApplicationByDepartmentManager |
41 | 41 | * @return WorkflowSettings |
42 | 42 | */ |
43 | - public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager ) |
|
43 | + public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager) |
|
44 | 44 | { |
45 | - $this->acceptApplicationByDepartmentManager= $acceptApplicationByDepartmentManager; |
|
45 | + $this->acceptApplicationByDepartmentManager = $acceptApplicationByDepartmentManager; |
|
46 | 46 | return $this; |
47 | 47 | } |
48 | 48 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @param bool $assignDepartmentManagersToJobs |
63 | 63 | * @return WorkflowSettings |
64 | 64 | */ |
65 | - public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs ) |
|
65 | + public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs) |
|
66 | 66 | { |
67 | 67 | $this->assignDepartmentManagersToJobs = $assignDepartmentManagersToJobs; |
68 | 68 | return $this; |
@@ -142,7 +142,7 @@ |
||
142 | 142 | /** |
143 | 143 | * @return bool |
144 | 144 | */ |
145 | - public function getAutoConfirmMail(){ |
|
145 | + public function getAutoConfirmMail() { |
|
146 | 146 | return $this->autoConfirmMail; |
147 | 147 | } |
148 | 148 | } |
@@ -30,17 +30,17 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Event is fired when a new application is saved. |
32 | 32 | */ |
33 | - const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
33 | + const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Event is fired when a users deleted application |
37 | 37 | */ |
38 | - const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
38 | + const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Event is fired when the status of an application is changed |
42 | 42 | */ |
43 | - const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
43 | + const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @var Application $application |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | $this->setApplicationEntity($params->application); |
234 | 234 | } |
235 | 235 | |
236 | - if(is_array($params) && isset($params['user'])) { |
|
236 | + if (is_array($params) && isset($params['user'])) { |
|
237 | 237 | $this->setUser($params['user']); |
238 | 238 | unset($params['user']); |
239 | 239 | } |
240 | 240 | |
241 | - if(is_array($params) && isset($params['status'])) { |
|
241 | + if (is_array($params) && isset($params['status'])) { |
|
242 | 242 | $this->setStatus($params['status']); |
243 | 243 | unset($params['status']); |
244 | 244 | } |
@@ -42,10 +42,10 @@ |
||
42 | 42 | |
43 | 43 | //default sorting |
44 | 44 | if (!isset($params['sort'])) { |
45 | - $params['sort']="-date"; |
|
45 | + $params['sort'] = "-date"; |
|
46 | 46 | } |
47 | 47 | $params->count = 5; |
48 | - $params->pageRange=5; |
|
48 | + $params->pageRange = 5; |
|
49 | 49 | |
50 | 50 | $this->paginationParams()->setParams('Applications\Index', $params); |
51 | 51 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | |
49 | - $timezones=array_merge( |
|
49 | + $timezones = array_merge( |
|
50 | 50 | \DateTimeZone::listIdentifiers(\DateTimeZone::AFRICA), |
51 | 51 | \DateTimeZone::listIdentifiers(\DateTimeZone::AMERICA), |
52 | 52 | \DateTimeZone::listIdentifiers(\DateTimeZone::ASIA), |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $currentTemplate = $view->viewModel() |
75 | 75 | ->getCurrent() |
76 | 76 | ->getTemplate(); |
77 | - $partial = dirname($currentTemplate) . '/' . $options['partial']; |
|
77 | + $partial = dirname($currentTemplate).'/'.$options['partial']; |
|
78 | 78 | |
79 | 79 | if (!$options['oneClickOnly'] && $data['uri']) { |
80 | 80 | $variables['default'] = [ |