Completed
Pull Request — develop (#329)
by Carsten
09:54
created
module/Applications/src/Applications/Listener/EventApplicationCreated.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                         [
77 77
                             'job' => $job,
78 78
                             'user' => $employee->getUser(),
79
-                            'bcc' => $adminSettings->getMailBCC() ? [ $admin ] : null,
79
+                            'bcc' => $adminSettings->getMailBCC() ? [$admin] : null,
80 80
                         ]
81 81
                     );
82 82
                 }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 [
95 95
                     'job'   => $this->application->getJob(),
96 96
                     'user'  => $recruiter,
97
-                    'bcc' => $adminSettings->getMailBCC() ? [ $admin ] : null,
97
+                    'bcc' => $adminSettings->getMailBCC() ? [$admin] : null,
98 98
                 ]
99 99
             );
100 100
         }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                     [
112 112
                         'application' => $this->application,
113 113
                         'body'        => $ackBody,
114
-                        'bcc'         => $adminSettings->getMailBCC() ? [ $admin ] : null,
114
+                        'bcc'         => $adminSettings->getMailBCC() ? [$admin] : null,
115 115
                     ]
116 116
                 );
117 117
 
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/StatusChange.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @param ApplicationEvent $e
70 70
      */
71
-    public function prepareFormData(ApplicationEvent $e){
71
+    public function prepareFormData(ApplicationEvent $e) {
72 72
         if ($e->isPostRequest()) {
73 73
             return;
74 74
         }
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
                 $key = 'mailRejectionText';
96 96
                 break;
97 97
             default:
98
-                throw new \InvalidArgumentException('Unknown status value: ' .$status);
98
+                throw new \InvalidArgumentException('Unknown status value: '.$status);
99 99
         }
100
-        $mailText      = $settings->$key ? $settings->$key : '';
100
+        $mailText = $settings->$key ? $settings->$key : '';
101 101
         $mail->setBody($mailText);
102 102
         $mail->setApplication($this->application);
103 103
         $mailText = $mail->getBodyText();
104
-        $mailSubject   = sprintf(
104
+        $mailSubject = sprintf(
105 105
             $this->translator->translate('Your application dated %s'),
106 106
             strftime('%x', $this->application->getDateCreated()->getTimestamp())
107 107
         );
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @param ApplicationEvent $event
123 123
      */
124
-    public function  sendMail(ApplicationEvent $event){
124
+    public function  sendMail(ApplicationEvent $event) {
125 125
         if (!$event->isPostRequest()) {
126 126
             return;
127 127
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $this->mailService->send($mail);
168 168
 
169 169
 
170
-        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] );
170
+        $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]);
171 171
         $this->application->changeStatus($status, $historyText);
172 172
         $event->setNotification($historyText);
173 173
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return AddressList
180 180
      */
181
-    protected function getRecipient( Application $application, $status) {
181
+    protected function getRecipient(Application $application, $status) {
182 182
 
183 183
         $recipient = Status::ACCEPTED == $status
184 184
             ? $application->getJob()->getUser()->getInfo()
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $email = $recipient->getEmail();
188 188
         $name  = $recipient->getDisplayName(false);
189 189
 
190
-        return $name ? [ $email => $name ] : [ $email ];
190
+        return $name ? [$email => $name] : [$email];
191 191
     }
192 192
 
193 193
 }
194 194
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/MailServiceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         $config = new MailServiceConfig($configArray);
41 41
 
42
-        $service   = new MailService($serviceLocator, $config);
42
+        $service = new MailService($serviceLocator, $config);
43 43
 
44 44
         return $service;
45 45
 
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/MailService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $self = $this;
88 88
 
89 89
         $this->addInitializer(
90
-            function ($instance) use ($self) {
90
+            function($instance) use ($self) {
91 91
                 if ($instance instanceof TranslatorAwareInterface) {
92 92
                     $translator = $self->getServiceLocator()->get('translator');
93 93
                     $instance->setTranslator($translator);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             false
101 101
         );
102 102
         $this->addInitializer(
103
-            function ($instance) {
103
+            function($instance) {
104 104
                 if (method_exists($instance, 'setServiceLocator')) {
105 105
                     $instance->setServiceLocator($this);
106 106
                 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             false
109 109
         );
110 110
         $this->addInitializer(
111
-            function ($instance) {
111
+            function($instance) {
112 112
                 if (method_exists($instance, 'init')) {
113 113
                     $instance->init();
114 114
                 }
@@ -199,11 +199,11 @@  discard block
 block discarded – undo
199 199
         if ($this->overrideRecipient instanceof AddressList) {
200 200
             $originalRecipient = $headers->get('to')->toString();
201 201
             if ($headers->has('cc')) {
202
-                $originalRecipient .= '; ' . $headers->get('cc')->toString();
202
+                $originalRecipient .= '; '.$headers->get('cc')->toString();
203 203
                 $headers->removeHeader('cc');
204 204
             }
205 205
             if ($headers->has('bcc')) {
206
-                $originalRecipient .= '; ' . $headers->get('bcc')->toString();
206
+                $originalRecipient .= '; '.$headers->get('bcc')->toString();
207 207
                 $headers->removeHeader('bcc');
208 208
             }
209 209
             $headers->addHeaderLine('X-Original-Recipients', $originalRecipient);
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/HTMLTemplateMessage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         }
230 230
 
231 231
         /* @var \Zend\Mvc\View\Http\ViewManager $viewManager */
232
-        $viewManager  = $this->serviceManager->get('viewManager');
232
+        $viewManager = $this->serviceManager->get('viewManager');
233 233
         $resolver = $this->serviceManager->get('viewResolver');
234 234
 
235 235
         /* @var \Zend\Mvc\MvcEvent $event */
@@ -237,13 +237,13 @@  discard block
 block discarded – undo
237 237
         $lang = $event->getRouteMatch()->getParam('lang');
238 238
 
239 239
 
240
-        if ($resolver->resolve($this->getTemplate() . '.' . $lang)) {
241
-            $viewModel->setTemplate($this->getTemplate() . '.' . $lang);
242
-        }else{
240
+        if ($resolver->resolve($this->getTemplate().'.'.$lang)) {
241
+            $viewModel->setTemplate($this->getTemplate().'.'.$lang);
242
+        } else {
243 243
             $viewModel->setTemplate($this->getTemplate());
244 244
         }
245 245
 
246
-        $view         = $viewManager->getView();
246
+        $view = $viewManager->getView();
247 247
 
248 248
         $viewModel->setVariables($this->getVariables());
249 249
         $view->setResponse($response);
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/FileController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $response      = $this->getResponse();
51 51
         
52 52
         try {
53
-            $repository = $this->serviceLocator->get('repositories')->get($module . '/' . $entityName);
53
+            $repository = $this->serviceLocator->get('repositories')->get($module.'/'.$entityName);
54 54
         } catch (\Exception $e) {
55 55
             $response->setStatusCode(404);
56 56
             $this->getEvent()->setParam('exception', $e);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         
85 85
         $this->acl($file);
86 86
 
87
-        $headers=$response->getHeaders();
87
+        $headers = $response->getHeaders();
88 88
 
89 89
         $headers->addHeaderline('Content-Type', $file->getType())
90 90
             ->addHeaderline('Content-Length', $file->getLength());
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/CreatePaginatorService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@
 block discarded – undo
61 61
         $paginatorManager = $this->serviceManager->get('Core/PaginatorService');
62 62
         $paginator = $paginatorManager->get($paginatorName);
63 63
         if (!isset($paginator) || !$paginator instanceof ZendPaginator) {
64
-            throw new \RuntimeException('Could not create paginator ' . $paginatorName);
64
+            throw new \RuntimeException('Could not create paginator '.$paginatorName);
65 65
         }
66 66
         $adapter = $paginator->getAdapter();
67 67
         if (!isset($adapter) || !$adapter instanceof AdapterInterface) {
68
-            throw new \RuntimeException('Paginator ' . $paginatorName . ' has no Adapter');
68
+            throw new \RuntimeException('Paginator '.$paginatorName.' has no Adapter');
69 69
         }
70 70
 
71 71
         $params     = $usePostParams
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/DeferredListenerAggregate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     public function __call($method, $args)
215 215
     {
216 216
         if (0 !== strpos($method, 'do')) {
217
-            throw new \BadMethodCallException('Unknown method "' . $method . '"');
217
+            throw new \BadMethodCallException('Unknown method "'.$method.'"');
218 218
         }
219 219
 
220 220
         $name = substr($method, 2);
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         }
249 249
 
250 250
         if ($method && method_exists($listener, $method)) {
251
-            return call_user_func_array([ $listener, $method ], $args);
251
+            return call_user_func_array([$listener, $method], $args);
252 252
         }
253 253
 
254 254
         if (is_callable($listener)) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
         throw new \UnexpectedValueException(sprintf(
259 259
             'Deferred listener %s%s is not callable.',
260
-            get_class($listener), $method ? ' has no method "' . $method . '" and ' : ''
260
+            get_class($listener), $method ? ' has no method "'.$method.'" and ' : ''
261 261
         ));
262 262
     }
263 263
     
Please login to merge, or discard this patch.
module/Core/src/Core/Paginator/PaginatorServiceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $configArray = isset($configArray['paginator_manager']) ? $configArray['paginator_manager'] : array();
33 33
         $config      = new PaginatorServiceConfig($configArray);
34 34
 
35
-        $service   = new PaginatorService($serviceLocator, $config);
35
+        $service = new PaginatorService($serviceLocator, $config);
36 36
 
37 37
         return $service;
38 38
     }
Please login to merge, or discard this patch.