@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | |
74 | 74 | public function injectXmlTemplate(MvcEvent $e) |
75 | 75 | { |
76 | - $format = $e->getRouteMatch()->getParam('format',"html"); |
|
77 | - $channel = $e->getRouteMatch()->getParam('channel',"default"); |
|
76 | + $format = $e->getRouteMatch()->getParam('format', "html"); |
|
77 | + $channel = $e->getRouteMatch()->getParam('channel', "default"); |
|
78 | 78 | |
79 | 79 | if ('xml' == $format) { |
80 | 80 | $viewModel = $e->getResult(); |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | } |
84 | 84 | $resolver = $e->getApplication()->getServiceManager()->get('ViewResolver'); |
85 | 85 | |
86 | - $templateDefault = $viewModel->getTemplate() . '.xml.phtml'; |
|
87 | - $templateChannel = $viewModel->getTemplate() . '.' . $channel . '.xml.phtml'; |
|
86 | + $templateDefault = $viewModel->getTemplate().'.xml.phtml'; |
|
87 | + $templateChannel = $viewModel->getTemplate().'.'.$channel.'.xml.phtml'; |
|
88 | 88 | |
89 | 89 | |
90 | 90 | if ($channel != 'default' && $resolver->resolve($templateChannel)) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | /* @var Response $response */ |
103 | 103 | $response = $e->getResponse(); |
104 | - $response->getHeaders()->addHeaderLine('Content-Type','application/xml'); |
|
104 | + $response->getHeaders()->addHeaderLine('Content-Type', 'application/xml'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | public function __invoke(Job $jobEntity, $options = []) |
79 | 79 | { |
80 | - $options= array_merge($this->options, $options); |
|
80 | + $options = array_merge($this->options, $options); |
|
81 | 81 | |
82 | 82 | $ats = $jobEntity->getAtsMode(); |
83 | 83 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | if ($ats->isIntern() || $ats->isEmail()) { |
93 | 93 | |
94 | - $query = [ 'subscriberUri' => $serverUrlHelper(array()) . '/subscriber/' . 1 ]; |
|
94 | + $query = ['subscriberUri' => $serverUrlHelper(array()).'/subscriber/'.1]; |
|
95 | 95 | $route = 'lang/apply'; |
96 | 96 | $params = [ |
97 | 97 | 'applyId' => $jobEntity->getApplyId(), |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | $url = $ats->getUri(); |
107 | 107 | } |
108 | 108 | |
109 | - if($options['linkOnly']){ |
|
110 | - $result=$url; |
|
111 | - if($options['absolute']) { |
|
109 | + if ($options['linkOnly']) { |
|
110 | + $result = $url; |
|
111 | + if ($options['absolute']) { |
|
112 | 112 | $result = $serverUrlHelper($url); |
113 | 113 | } |
114 | - }else{ |
|
114 | + } else { |
|
115 | 115 | $translate = $this->translateHelper; |
116 | 116 | $result = sprintf('<a href="%s" rel="nofollow">%s</a>', $url, $translate('Apply')); |
117 | 117 | } |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * @param $options |
124 | 124 | */ |
125 | - public function setOptions($options){ |
|
126 | - foreach($options as $key=>$val) { |
|
127 | - if (array_key_exists($this->options,$key)) { |
|
128 | - $this->options[$key]=$val; |
|
125 | + public function setOptions($options) { |
|
126 | + foreach ($options as $key=>$val) { |
|
127 | + if (array_key_exists($this->options, $key)) { |
|
128 | + $this->options[$key] = $val; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | public function __invoke(Job $jobEntity, $options = []) |
61 | 61 | { |
62 | 62 | |
63 | - $options= array_merge($this->options, $options); |
|
63 | + $options = array_merge($this->options, $options); |
|
64 | 64 | $paramsHelper = $this->paramsHelper; |
65 | 65 | $urlHelper = $this->urlHelper; |
66 | 66 | $serverUrlHelper = $this->serverUrlHelper; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if (!empty($jobEntity->getLink())) { |
70 | 70 | $url = $jobEntity->getLink(); |
71 | 71 | $isExternalLink = true; |
72 | - }elseif($options['showPendingJobs']) { |
|
72 | + }elseif ($options['showPendingJobs']) { |
|
73 | 73 | $url = $urlHelper( |
74 | 74 | 'lang/jobs/approval', |
75 | 75 | [], |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | ] |
80 | 80 | ], true); |
81 | 81 | |
82 | - }else{ |
|
82 | + } else { |
|
83 | 83 | |
84 | 84 | $query = [ |
85 | - 'subscriberUri' => $serverUrlHelper([]) . '/subscriber/' . 1, |
|
85 | + 'subscriberUri' => $serverUrlHelper([]).'/subscriber/'.1, |
|
86 | 86 | 'id' => $jobEntity->getId() |
87 | 87 | ]; |
88 | 88 | $route = 'lang/jobs/view'; |
@@ -95,16 +95,16 @@ discard block |
||
95 | 95 | $url = $urlHelper($route, $params, array('query' => $query)); |
96 | 96 | } |
97 | 97 | |
98 | - if ($options['linkOnly']){ |
|
98 | + if ($options['linkOnly']) { |
|
99 | 99 | $result = $url; |
100 | - if ($options['absolute'] && !$isExternalLink){ |
|
100 | + if ($options['absolute'] && !$isExternalLink) { |
|
101 | 101 | $result = $serverUrlHelper($url); |
102 | 102 | } |
103 | - }else{ |
|
103 | + } else { |
|
104 | 104 | $result = sprintf('<a href="%s" rel="%s" %s>%s</a>', |
105 | 105 | $url, |
106 | 106 | $options['rel'], |
107 | - $options['target']?"target=" . $options['target']:"", |
|
107 | + $options['target'] ? "target=".$options['target'] : "", |
|
108 | 108 | strip_tags($jobEntity->getTitle())); |
109 | 109 | } |
110 | 110 | |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * @param $options |
116 | 116 | */ |
117 | - public function setOptions($options){ |
|
118 | - foreach($options as $key=>$val) { |
|
119 | - if (array_key_exists($this->options,$key)) { |
|
120 | - $this->options[$key]=$val; |
|
117 | + public function setOptions($options) { |
|
118 | + foreach ($options as $key=>$val) { |
|
119 | + if (array_key_exists($this->options, $key)) { |
|
120 | + $this->options[$key] = $val; |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function viewAction() |
57 | 57 | { |
58 | 58 | $id = $this->params()->fromQuery('id'); |
59 | - $channel = $this->params()->fromRoute('channel','default'); |
|
59 | + $channel = $this->params()->fromRoute('channel', 'default'); |
|
60 | 60 | $response = $this->getResponse(); |
61 | 61 | /* @var \Jobs\Entity\Job $job */ |
62 | 62 | $job = $this->jobRepository->find($id); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $this->auth()->isAdmin() |
84 | 84 | ) { |
85 | 85 | $applicationViewModel->setTemplate('iframe/iFrameInjection'); |
86 | - }elseif(Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
86 | + }elseif (Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
87 | 87 | $response->setStatusCode(Response::STATUS_CODE_410); |
88 | 88 | $model->setTemplate('jobs/error/expired'); |
89 | 89 | $model->setVariables( |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | protected function editTemplateAction() |
112 | 112 | { |
113 | 113 | $id = $this->params('id'); |
114 | - $formIdentifier=$this->params()->fromQuery('form'); |
|
114 | + $formIdentifier = $this->params()->fromQuery('form'); |
|
115 | 115 | $job = $this->jobRepository->find($id); |
116 | 116 | $this->acl($job, 'edit'); |
117 | 117 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $instanceForm = $formTemplate->get($formIdentifier); |
144 | 144 | if (!isset($instanceForm)) { |
145 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
145 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | // the id is part of the postData, but it never should be altered |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return $this; |
70 | 70 | } |
71 | 71 | |
72 | - public function getUsername(){ |
|
72 | + public function getUsername() { |
|
73 | 73 | return $this->connectionConfig['username']; |
74 | 74 | } |
75 | 75 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return $this; |
81 | 81 | } |
82 | 82 | |
83 | - public function getPassword(){ |
|
83 | + public function getPassword() { |
|
84 | 84 | return $this->connectionConfig['password']; |
85 | 85 | } |
86 | 86 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return $this; |
92 | 92 | } |
93 | 93 | |
94 | - public function getSsl(){ |
|
94 | + public function getSsl() { |
|
95 | 95 | return $this->connectionConfig['ssl']; |
96 | 96 | } |
97 | 97 | } |
98 | 98 | \ No newline at end of file |
@@ -67,7 +67,7 @@ |
||
67 | 67 | 'lang/jobs/view', |
68 | 68 | [], |
69 | 69 | [ |
70 | - 'query' => [ 'id' => $job->getId() ], |
|
70 | + 'query' => ['id' => $job->getId()], |
|
71 | 71 | 'force_canonical' => true |
72 | 72 | ] |
73 | 73 | ); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @license MIT |
13 | 13 | */ |
14 | 14 | |
15 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
15 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
16 | 16 | |
17 | 17 | |
18 | 18 | return array( |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'doctrine' => $doctrineConfig, |
21 | 21 | |
22 | 22 | 'options' => [ |
23 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
23 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
24 | 24 | ], |
25 | 25 | |
26 | 26 | 'Core' => array( |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | 'name' => 'stream', |
41 | 41 | 'priority' => 1000, |
42 | 42 | 'options' => array( |
43 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
43 | + 'stream' => __DIR__.'/../../../log/yawik.log', |
|
44 | 44 | ), |
45 | 45 | ), |
46 | 46 | ), |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'name' => 'stream', |
52 | 52 | 'priority' => 1000, |
53 | 53 | 'options' => array( |
54 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
54 | + 'stream' => __DIR__.'/../../../log/mails.log', |
|
55 | 55 | ), |
56 | 56 | ), |
57 | 57 | ), |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'ErrorLogger' => array( |
60 | 60 | 'service' => 'Core/ErrorLogger', |
61 | 61 | 'config' => array( |
62 | - 'stream' => __DIR__ . '/../../../log/error.log', |
|
62 | + 'stream' => __DIR__.'/../../../log/error.log', |
|
63 | 63 | 'log_errors' => true, |
64 | 64 | 'log_exceptions' => true, |
65 | 65 | ), |
@@ -221,17 +221,17 @@ discard block |
||
221 | 221 | 'translation_file_patterns' => array( |
222 | 222 | [ |
223 | 223 | 'type' => 'gettext', |
224 | - 'base_dir' => __DIR__ . '/../language', |
|
224 | + 'base_dir' => __DIR__.'/../language', |
|
225 | 225 | 'pattern' => '%s.mo', |
226 | 226 | ], |
227 | 227 | [ |
228 | 228 | 'type' => 'phparray', |
229 | - 'base_dir' => __DIR__ . '/../language', |
|
229 | + 'base_dir' => __DIR__.'/../language', |
|
230 | 230 | 'pattern' => 'Zend_Validate.%s.php', |
231 | 231 | ], |
232 | 232 | [ |
233 | 233 | 'type' => 'phparray', |
234 | - 'base_dir' => __DIR__ . '/../language', |
|
234 | + 'base_dir' => __DIR__.'/../language', |
|
235 | 235 | 'pattern' => 'Zend_Captcha.%s.php', |
236 | 236 | ] |
237 | 237 | ), |
@@ -300,32 +300,32 @@ discard block |
||
300 | 300 | 'exception_template' => 'error/index', |
301 | 301 | // Map template to files. Speeds up the lookup through the template stack. |
302 | 302 | 'template_map' => array( |
303 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
304 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
305 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
306 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
307 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
308 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
309 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
310 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
311 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
312 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
313 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
314 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
315 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
316 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
317 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
318 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
319 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
320 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
321 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
322 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
323 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
303 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
304 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
305 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
306 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
307 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
308 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
309 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
310 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
311 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
312 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
313 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
314 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
315 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
316 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
317 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
318 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
319 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
320 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
321 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
322 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
323 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
324 | 324 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
325 | 325 | ), |
326 | 326 | // Where to look for view templates not mapped above |
327 | 327 | 'template_path_stack' => array( |
328 | - __DIR__ . '/../view', |
|
328 | + __DIR__.'/../view', |
|
329 | 329 | ), |
330 | 330 | ), |
331 | 331 | 'view_helpers' => array( |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * |
143 | 143 | * @return array |
144 | 144 | */ |
145 | - protected function createValueOptions(NodeInterface $node, $allowSelectNodes = false, $isRoot=true) |
|
145 | + protected function createValueOptions(NodeInterface $node, $allowSelectNodes = false, $isRoot = true) |
|
146 | 146 | { |
147 | 147 | $key = $isRoot ? $node->getValue() : $this->getItemValue($node); |
148 | 148 | $name = $node->getName(); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | private function getItemValue(NodeInterface $item) |
183 | 183 | { |
184 | - $parts = [ $item->getValue() ]; |
|
184 | + $parts = [$item->getValue()]; |
|
185 | 185 | |
186 | 186 | while ($item = $item->getParent()) { |
187 | 187 | $parts[] = $item->getValue(); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $parent = $nextParent; |
72 | 72 | } |
73 | 73 | $nameParts[] = $item->getName(); |
74 | - $items[] = join(' / ' , $nameParts); |
|
74 | + $items[] = join(' / ', $nameParts); |
|
75 | 75 | |
76 | 76 | } |
77 | 77 |