@@ -114,10 +114,10 @@ |
||
114 | 114 | } else { |
115 | 115 | $result = sprintf( |
116 | 116 | '<a href="%s" rel="%s" %s>%s</a>', |
117 | - $url, |
|
118 | - $options['rel'], |
|
119 | - $options['target']?"target=" . $options['target']:"", |
|
120 | - strip_tags($jobEntity->getTitle()) |
|
117 | + $url, |
|
118 | + $options['rel'], |
|
119 | + $options['target']?"target=" . $options['target']:"", |
|
120 | + strip_tags($jobEntity->getTitle()) |
|
121 | 121 | ); |
122 | 122 | } |
123 | 123 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function __invoke(Job $jobEntity, $options = [], $urlParams = []) |
69 | 69 | { |
70 | - $options= array_merge($this->options, $options); |
|
70 | + $options = array_merge($this->options, $options); |
|
71 | 71 | $paramsHelper = $this->paramsHelper; |
72 | 72 | $urlHelper = $this->urlHelper; |
73 | 73 | $serverUrlHelper = $this->serverUrlHelper; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ); |
90 | 90 | } else { |
91 | 91 | $query = [ |
92 | - 'subscriberUri' => $serverUrlHelper([]) . '/subscriber/' . 1, |
|
92 | + 'subscriberUri' => $serverUrlHelper([]).'/subscriber/'.1, |
|
93 | 93 | 'id' => $jobEntity->getId() |
94 | 94 | ]; |
95 | 95 | if ($jobEntity instanceof JobSnapshot) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | '<a href="%s" rel="%s" %s>%s</a>', |
117 | 117 | $url, |
118 | 118 | $options['rel'], |
119 | - $options['target']?"target=" . $options['target']:"", |
|
119 | + $options['target'] ? "target=".$options['target'] : "", |
|
120 | 120 | strip_tags($jobEntity->getTitle()) |
121 | 121 | ); |
122 | 122 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | foreach ($options as $key=>$val) { |
133 | 133 | if (array_key_exists($this->options, $key)) { |
134 | - $this->options[$key]=$val; |
|
134 | + $this->options[$key] = $val; |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | } |
@@ -65,6 +65,6 @@ |
||
65 | 65 | 'admin' => 1, |
66 | 66 | ]], |
67 | 67 | true |
68 | - ) . '&return=' . $this->returnUrl; |
|
68 | + ).'&return='.$this->returnUrl; |
|
69 | 69 | } |
70 | 70 | } |
@@ -50,8 +50,8 @@ |
||
50 | 50 | $jsonLdProvider = new JsonLdProvider($job); |
51 | 51 | |
52 | 52 | return '<script type="application/ld+json">' |
53 | - . $jsonLdProvider->toJsonLd() |
|
54 | - . '</script>'; |
|
53 | + . $jsonLdProvider->toJsonLd() |
|
54 | + . '</script>'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $currentTemplate = $view->viewModel() |
76 | 76 | ->getCurrent() |
77 | 77 | ->getTemplate(); |
78 | - $partial = dirname($currentTemplate) . '/' . $options['partial']; |
|
78 | + $partial = dirname($currentTemplate).'/'.$options['partial']; |
|
79 | 79 | |
80 | 80 | if (!$options['oneClickOnly'] && $data['uri']) { |
81 | 81 | $variables['default'] = [ |
@@ -23,35 +23,35 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Job has been published |
25 | 25 | */ |
26 | - const RESPONSE_OK = 'ok'; |
|
26 | + const RESPONSE_OK = 'ok'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Job has been published and has stopped all other publishing |
30 | 30 | */ |
31 | - const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
31 | + const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * publishing has been stopped |
35 | 35 | */ |
36 | - const RESPONSE_STOP = 'publishing terminated'; |
|
36 | + const RESPONSE_STOP = 'publishing terminated'; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * publishing has been denied, |
40 | 40 | * this is very likely when a job was not intended to be sended to a portal |
41 | 41 | */ |
42 | - const RESPONSE_DENIED = 'denied'; |
|
42 | + const RESPONSE_DENIED = 'denied'; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * a connection to the portal could not be established |
46 | 46 | * or the publishing of the Job has been rejected for other reasons |
47 | 47 | */ |
48 | - const RESPONSE_FAIL = 'fail'; |
|
48 | + const RESPONSE_FAIL = 'fail'; |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * This error has nothing to do with wrong inputs, |
52 | 52 | * something just has happend in the programm |
53 | 53 | */ |
54 | - const RESPONSE_ERROR = 'internal Error'; |
|
54 | + const RESPONSE_ERROR = 'internal Error'; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * nothing happens, but that's not a failure |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * nothing happens, and get used to it |
64 | 64 | */ |
65 | - const RESPONSE_DEPRECATED = 'deprecated'; |
|
65 | + const RESPONSE_DEPRECATED = 'deprecated'; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * @var string |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @param string $portal |
84 | 84 | * @param string $status |
85 | 85 | */ |
86 | - public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message='') |
|
86 | + public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message = '') |
|
87 | 87 | { |
88 | 88 | $this->portal = $portal; |
89 | 89 | $this->status = $status; |
@@ -172,12 +172,12 @@ |
||
172 | 172 | |
173 | 173 | if ($publisher->externalId != $response_externalIdUpdate || $publisher->reference != $response_referenceUpdate) { |
174 | 174 | $logInfo = 'RestCall changed externalID [' |
175 | - . var_export($publisher->externalId, true) |
|
176 | - . ' => ' |
|
177 | - . var_export($response_externalIdUpdate, true) . '], reference [' |
|
178 | - . var_export($publisher->reference, true) |
|
179 | - . ' => ' |
|
180 | - . var_export($response_referenceUpdate, true) . ']'; |
|
175 | + . var_export($publisher->externalId, true) |
|
176 | + . ' => ' |
|
177 | + . var_export($response_externalIdUpdate, true) . '], reference [' |
|
178 | + . var_export($publisher->reference, true) |
|
179 | + . ' => ' |
|
180 | + . var_export($response_referenceUpdate, true) . ']'; |
|
181 | 181 | $log->info($logInfo); |
182 | 182 | $publisher->reference = $response_referenceUpdate; |
183 | 183 | $publisher->externalId = $response_externalIdUpdate; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param EventManagerInterface $events |
47 | 47 | * @return $this |
48 | 48 | */ |
49 | - public function attach(EventManagerInterface $events, $priority=1) |
|
49 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
50 | 50 | { |
51 | 51 | return $this; |
52 | 52 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $jsonLastError = json_last_error(); |
165 | 165 | if (json_last_error() != JSON_ERROR_NONE) { |
166 | 166 | // not able to decode json |
167 | - $log->info('RestCall Response not Json [errorCode: ' . $jsonLastError . ']: ' . var_export($body, true)); |
|
167 | + $log->info('RestCall Response not Json [errorCode: '.$jsonLastError.']: '.var_export($body, true)); |
|
168 | 168 | } else { |
169 | 169 | // does the provider want to have an own ID for Identification ? |
170 | 170 | $response_referenceUpdate = $decodedBody->referenceUpdate; |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | $logInfo = 'RestCall changed externalID [' |
175 | 175 | . var_export($publisher->externalId, true) |
176 | 176 | . ' => ' |
177 | - . var_export($response_externalIdUpdate, true) . '], reference [' |
|
177 | + . var_export($response_externalIdUpdate, true).'], reference [' |
|
178 | 178 | . var_export($publisher->reference, true) |
179 | 179 | . ' => ' |
180 | - . var_export($response_referenceUpdate, true) . ']'; |
|
180 | + . var_export($response_referenceUpdate, true).']'; |
|
181 | 181 | $log->info($logInfo); |
182 | 182 | $publisher->reference = $response_referenceUpdate; |
183 | 183 | $publisher->externalId = $response_externalIdUpdate; |
@@ -136,13 +136,13 @@ |
||
136 | 136 | { |
137 | 137 | $mail = $this->mailer->get('htmltemplate'); |
138 | 138 | $mail->setTemplate($template) |
139 | - ->setSubject($subject) |
|
140 | - ->setVariables( |
|
141 | - array( |
|
139 | + ->setSubject($subject) |
|
140 | + ->setVariables( |
|
141 | + array( |
|
142 | 142 | 'job' => $job, |
143 | 143 | 'siteName' => $this->options['siteName'], |
144 | 144 | ) |
145 | - ); |
|
145 | + ); |
|
146 | 146 | |
147 | 147 | if ($adminMail) { |
148 | 148 | $mail->setTo($this->options['adminEmail']); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->options = array_merge($this->options, $options); |
62 | 62 | } |
63 | 63 | |
64 | - public function attach(EventManagerInterface $events, $priority=1) |
|
64 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
65 | 65 | { |
66 | 66 | $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_CREATED, array($this, 'onJobCreated')); |
67 | 67 | $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_ACCEPTED, array($this, 'onJobAccepted')); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | if ($adminMail) { |
150 | 150 | $mail->setTo($this->options['adminEmail']); |
151 | 151 | } else { |
152 | - if (! ($user = $job->getUser())) { |
|
152 | + if (!($user = $job->getUser())) { |
|
153 | 153 | return; |
154 | 154 | } |
155 | 155 | $userInfo = $user->getInfo(); |
@@ -35,21 +35,21 @@ |
||
35 | 35 | $pending = $this->repository->count(['status.name' => StatusInterface::CREATED]); |
36 | 36 | |
37 | 37 | $event->addViewVariables('jobs', [ |
38 | - 'title' => 'Jobs', |
|
39 | - 'data' => [ |
|
38 | + 'title' => 'Jobs', |
|
39 | + 'data' => [ |
|
40 | 40 | /*@translate*/ 'Total jobs' => [ |
41 | 41 | 'url' => [ 'lang/admin/jobs', [], true ], |
42 | 42 | 'value' => $total, |
43 | 43 | ], |
44 | 44 | /*@translate*/ 'Active jobs' => [ |
45 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'active' ]], true ], |
|
46 | - 'value' => $active |
|
47 | - ], |
|
45 | + 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'active' ]], true ], |
|
46 | + 'value' => $active |
|
47 | + ], |
|
48 | 48 | /*@translate*/ 'Pending jobs' => [ |
49 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'created' ]], true ], |
|
50 | - 'value' => $pending |
|
51 | - ] |
|
52 | - ], |
|
53 | - ]); |
|
49 | + 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'created' ]], true ], |
|
50 | + 'value' => $pending |
|
51 | + ] |
|
52 | + ], |
|
53 | + ]); |
|
54 | 54 | } |
55 | 55 | } |
@@ -39,15 +39,15 @@ |
||
39 | 39 | 'title' => 'Jobs', |
40 | 40 | 'data' => [ |
41 | 41 | /*@translate*/ 'Total jobs' => [ |
42 | - 'url' => [ 'lang/admin/jobs', [], true ], |
|
42 | + 'url' => ['lang/admin/jobs', [], true], |
|
43 | 43 | 'value' => $total, |
44 | 44 | ], |
45 | 45 | /*@translate*/ 'Active jobs' => [ |
46 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'active' ]], true ], |
|
46 | + 'url' => ['lang/admin/jobs', [], ['query' => ['status' => 'active']], true], |
|
47 | 47 | 'value' => $active |
48 | 48 | ], |
49 | 49 | /*@translate*/ 'Pending jobs' => [ |
50 | - 'url' => [ 'lang/admin/jobs', [], ['query' => [ 'status' => 'created' ]], true ], |
|
50 | + 'url' => ['lang/admin/jobs', [], ['query' => ['status' => 'created']], true], |
|
51 | 51 | 'value' => $pending |
52 | 52 | ] |
53 | 53 | ], |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | * Event is fired when a users has created a new job opening and accepted the |
34 | 34 | * terms and conditions |
35 | 35 | */ |
36 | - const EVENT_JOB_CREATED = 'job.created'; |
|
36 | + const EVENT_JOB_CREATED = 'job.created'; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Event is fired when the owner of the YAWIK installation has accepted the job |
40 | 40 | * opening |
41 | 41 | */ |
42 | - const EVENT_JOB_ACCEPTED = 'job.accepted'; |
|
42 | + const EVENT_JOB_ACCEPTED = 'job.accepted'; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Event is fired, when the owner of the YAWIK installation has rejected the job |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * get all available names for publishing |
57 | 57 | */ |
58 | - const PORTAL_AVAIL_NAME = 'portal.availname'; |
|
58 | + const PORTAL_AVAIL_NAME = 'portal.availname'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * portals to be published |