@@ -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), |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (null === $buttonContent) { |
29 | 29 | throw new Exception\DomainException( |
30 | 30 | sprintf( |
31 | - '%s expects either button content as the second argument, ' . |
|
31 | + '%s expects either button content as the second argument, '. |
|
32 | 32 | 'or that the element provided has a label value; neither found', |
33 | 33 | __METHOD__ |
34 | 34 | ) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $checkedBoole = ($value == 1 || $value == 'on'); |
52 | 52 | |
53 | 53 | //$checked = $checkedBoole?'checked="checked"':''; |
54 | - $checkedClass = $checkedBoole?'active"':''; |
|
54 | + $checkedClass = $checkedBoole ? 'active"' : ''; |
|
55 | 55 | |
56 | 56 | $hiddenElement = ''; |
57 | 57 | if ($element->useHiddenElement()) { |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | $element->setUseHiddenElement(false); |
69 | 69 | } |
70 | 70 | |
71 | - $buttonContent = $hiddenElement . PHP_EOL |
|
72 | - . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL |
|
73 | - . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL |
|
74 | - . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL |
|
75 | - . '</div>' . PHP_EOL; |
|
71 | + $buttonContent = $hiddenElement.PHP_EOL |
|
72 | + . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL |
|
73 | + . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL |
|
74 | + . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL |
|
75 | + . '</div>'.PHP_EOL; |
|
76 | 76 | |
77 | 77 | //$buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> ' . |
78 | 78 | // $translator->translate('processing', $this->getTranslatorTextDomain()) . '</div><div class="default">' . $escape($buttonContent) . '</div></div>'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | ->getHybridAuth(); |
240 | 240 | /* @var $authProfile \Hybrid_User_Profile */ |
241 | 241 | $authProfile = $hybridAuth->authenticate($network) |
242 | - ->getUserProfile(); |
|
242 | + ->getUserProfile(); |
|
243 | 243 | |
244 | 244 | /* @var \Auth\Entity\SocialProfiles\AbstractProfile $profile */ |
245 | 245 | $profile = $this->plugin('Auth/SocialProfiles')->fetch($network); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } |
293 | 293 | |
294 | 294 | return $this->redirect() |
295 | - ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
295 | + ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | public function processPreviewAction() |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | throw new \RuntimeException('Invalid application id.'); |
92 | 92 | } |
93 | 93 | |
94 | - $action = 'process'; |
|
94 | + $action = 'process'; |
|
95 | 95 | |
96 | 96 | $routeMatch->setParam('action', $action); |
97 | 97 | } else { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | $this->response->setStatusCode(410); |
184 | 184 | $model = new ViewModel( |
185 | - [ 'content' => /*@translate*/ 'Invalid apply id'] |
|
185 | + ['content' => /*@translate*/ 'Invalid apply id'] |
|
186 | 186 | ); |
187 | 187 | $model->setTemplate('applications/error/not-found'); |
188 | 188 | return $model; |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | } |
361 | 361 | |
362 | 362 | if ('sendmail' == $this->params()->fromQuery('do')) { |
363 | - $jobEntity = $application->getJob(); |
|
363 | + $jobEntity = $application->getJob(); |
|
364 | 364 | |
365 | 365 | $mailData = array( |
366 | 366 | 'application' => $application, |
@@ -388,8 +388,8 @@ discard block |
||
388 | 388 | ->revoke($this->auth()->getUser(), PermissionsInterface::PERMISSION_CHANGE) |
389 | 389 | ->inherit($application->getJob()->getPermissions()); |
390 | 390 | |
391 | - $events = $services->get('Applications/Events'); |
|
392 | - $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, [ 'application' => $application ]); |
|
391 | + $events = $services->get('Applications/Events'); |
|
392 | + $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, ['application' => $application]); |
|
393 | 393 | |
394 | 394 | $model = new ViewModel( |
395 | 395 | array( |
@@ -182,7 +182,7 @@ |
||
182 | 182 | */ |
183 | 183 | public function setOneClickApply($oneClickApply) |
184 | 184 | { |
185 | - $this->oneClickApply = (bool)$oneClickApply; |
|
185 | + $this->oneClickApply = (bool) $oneClickApply; |
|
186 | 186 | |
187 | 187 | return $this; |
188 | 188 | } |
@@ -208,13 +208,13 @@ discard block |
||
208 | 208 | return $this->email; |
209 | 209 | } |
210 | 210 | |
211 | - /** |
|
212 | - * @return bool |
|
213 | - */ |
|
214 | - public function getOneClickApply() |
|
215 | - { |
|
216 | - return $this->oneClickApply; |
|
217 | - } |
|
211 | + /** |
|
212 | + * @return bool |
|
213 | + */ |
|
214 | + public function getOneClickApply() |
|
215 | + { |
|
216 | + return $this->oneClickApply; |
|
217 | + } |
|
218 | 218 | |
219 | 219 | |
220 | 220 | /** |
@@ -222,29 +222,29 @@ discard block |
||
222 | 222 | * |
223 | 223 | * @return $this |
224 | 224 | */ |
225 | - public function setOneClickApply($oneClickApply) |
|
226 | - { |
|
227 | - $this->oneClickApply = (bool)$oneClickApply; |
|
225 | + public function setOneClickApply($oneClickApply) |
|
226 | + { |
|
227 | + $this->oneClickApply = (bool)$oneClickApply; |
|
228 | 228 | |
229 | - return $this; |
|
230 | - } |
|
231 | - |
|
232 | - /** |
|
233 | - * @return array |
|
234 | - */ |
|
235 | - public function getOneClickApplyProfiles() |
|
236 | - { |
|
237 | - return $this->oneClickApplyProfiles; |
|
238 | - } |
|
239 | - |
|
240 | - /** |
|
241 | - * @param array $oneClickApplyProfiles |
|
242 | - * @return AtsMode |
|
243 | - */ |
|
244 | - public function setOneClickApplyProfiles(array $oneClickApplyProfiles) |
|
245 | - { |
|
246 | - $this->oneClickApplyProfiles = $oneClickApplyProfiles; |
|
229 | + return $this; |
|
230 | + } |
|
231 | + |
|
232 | + /** |
|
233 | + * @return array |
|
234 | + */ |
|
235 | + public function getOneClickApplyProfiles() |
|
236 | + { |
|
237 | + return $this->oneClickApplyProfiles; |
|
238 | + } |
|
239 | + |
|
240 | + /** |
|
241 | + * @param array $oneClickApplyProfiles |
|
242 | + * @return AtsMode |
|
243 | + */ |
|
244 | + public function setOneClickApplyProfiles(array $oneClickApplyProfiles) |
|
245 | + { |
|
246 | + $this->oneClickApplyProfiles = $oneClickApplyProfiles; |
|
247 | 247 | |
248 | - return $this; |
|
249 | - } |
|
248 | + return $this; |
|
249 | + } |
|
250 | 250 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'sendImmediately' => false |
72 | 72 | ], $options); |
73 | 73 | $view = $this->view; |
74 | - $currentTemplate = $view->viewModel() |
|
74 | + $currentTemplate = $view->viewModel() |
|
75 | 75 | ->getCurrent() |
76 | 76 | ->getTemplate(); |
77 | 77 | $partial = dirname($currentTemplate) . '/' . $options['partial']; |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $label = $options['oneClickLabel'] ?: $view->translate('Apply with %s'); |
88 | 88 | |
89 | 89 | foreach ($data['oneClickProfiles'] as $network) { |
90 | - $variables['oneClick'][] = [ |
|
90 | + $variables['oneClick'][] = [ |
|
91 | 91 | 'label' => sprintf($label, $network), |
92 | 92 | 'url' => $view->url('lang/apply-one-click', ['applyId' => $data['applyId'], 'network' => $network, 'immediately' => $options['sendImmediately'] ?: null], ['force_canonical' => true]), |
93 | - 'network' => $network |
|
93 | + 'network' => $network |
|
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | } |
@@ -98,22 +98,22 @@ discard block |
||
98 | 98 | return $view->partial($partial, $variables); |
99 | 99 | } |
100 | 100 | |
101 | - /** |
|
102 | - * @return string |
|
103 | - */ |
|
104 | - public function getPartial() |
|
105 | - { |
|
106 | - return $this->partial; |
|
107 | - } |
|
101 | + /** |
|
102 | + * @return string |
|
103 | + */ |
|
104 | + public function getPartial() |
|
105 | + { |
|
106 | + return $this->partial; |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * @param string $partial |
|
111 | - * @return ApplyButtons |
|
112 | - */ |
|
113 | - public function setPartial($partial) |
|
114 | - { |
|
115 | - $this->partial = $partial; |
|
109 | + /** |
|
110 | + * @param string $partial |
|
111 | + * @return ApplyButtons |
|
112 | + */ |
|
113 | + public function setPartial($partial) |
|
114 | + { |
|
115 | + $this->partial = $partial; |
|
116 | 116 | |
117 | - return $this; |
|
118 | - } |
|
117 | + return $this; |
|
118 | + } |
|
119 | 119 | } |
@@ -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'] = [ |
@@ -37,7 +37,7 @@ |
||
37 | 37 | break; |
38 | 38 | } |
39 | 39 | |
40 | - $config = $serviceLocator->get('Config'); |
|
40 | + $config = $serviceLocator->get('Config'); |
|
41 | 41 | |
42 | 42 | if (isset($config['view_manager'])) { |
43 | 43 | if (isset($config['view_manager']['display_exceptions'])) { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | ]; |
34 | 34 | |
35 | 35 | // do nothing for allowed routes |
36 | - if (in_array($routeName, $allowedRoutes)) |
|
36 | + if (in_array($routeName, $allowedRoutes)) |
|
37 | 37 | { |
38 | 38 | return; |
39 | 39 | } |
@@ -62,17 +62,17 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * @param array $statusOptions |
|
66 | - * @return UserStatusFieldset |
|
67 | - */ |
|
68 | - public function setStatusOptions(array $statusOptions) |
|
69 | - { |
|
70 | - $this->statusOptions = $statusOptions; |
|
65 | + * @param array $statusOptions |
|
66 | + * @return UserStatusFieldset |
|
67 | + */ |
|
68 | + public function setStatusOptions(array $statusOptions) |
|
69 | + { |
|
70 | + $this->statusOptions = $statusOptions; |
|
71 | 71 | |
72 | - return $this; |
|
73 | - } |
|
72 | + return $this; |
|
73 | + } |
|
74 | 74 | |
75 | - public function init() |
|
75 | + public function init() |
|
76 | 76 | { |
77 | 77 | $this->setName('status'); |
78 | 78 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | 'attributes' => [ |
122 | 122 | 'data-placeholder' => /*@translate*/ 'please select', |
123 | 123 | 'data-allowclear' => 'false', |
124 | - 'data-searchbox' => -1, // hide the search box |
|
124 | + 'data-searchbox' => -1, // hide the search box |
|
125 | 125 | 'required' => true, // mark label as required |
126 | 126 | ], |
127 | 127 | ) |
@@ -53,10 +53,10 @@ |
||
53 | 53 | public function __construct($status = self::ACTIVE) |
54 | 54 | { |
55 | 55 | if (!isset(static::$orderMap[$status])) { |
56 | - throw new \DomainException('Unknown status: ' . $status); |
|
56 | + throw new \DomainException('Unknown status: '.$status); |
|
57 | 57 | } |
58 | 58 | |
59 | - $constant = 'self::' . strtoupper($status); |
|
59 | + $constant = 'self::'.strtoupper($status); |
|
60 | 60 | $this->name = constant($constant); |
61 | 61 | $this->order = $this->getOrder(); |
62 | 62 | } |