Completed
Push — develop ( e649e8...88dc2a )
by
unknown
08:28
created
module/Organizations/config/module.config.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         'translation_file_patterns' => array(
37 37
             array(
38 38
                 'type' => 'gettext',
39
-                'base_dir' => __DIR__ . '/../language',
39
+                'base_dir' => __DIR__.'/../language',
40 40
                 'pattern' => '%s.mo',
41 41
             ),
42 42
         ),
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
     'view_manager' => array(
65 65
         // Map template to files. Speeds up the lookup through the template stack.
66 66
         'template_map' => array(
67
-             'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml',
68
-             'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml',
69
-             'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml',
70
-             'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml',
71
-             'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml',
72
-             'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml',
73
-             'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml',
74
-            'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml',
67
+             'organizations/index/edit' => __DIR__.'/../view/organizations/index/form.phtml',
68
+             'organizations/form/employees-fieldset' => __DIR__.'/../view/form/employees-fieldset.phtml',
69
+             'organizations/form/employee-fieldset' => __DIR__.'/../view/form/employee-fieldset.phtml',
70
+             'organizations/form/invite-employee-bar' => __DIR__.'/../view/form/invite-employee-bar.phtml',
71
+             'organizations/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml',
72
+             'organizations/error/invite' => __DIR__.'/../view/error/invite.phtml',
73
+             'organizations/mail/invite-employee' => __DIR__.'/../view/mail/invite-employee.phtml',
74
+            'organizations/form/workflow-fieldset' => __DIR__.'/../view/form/workflow-fieldset.phtml',
75 75
         ),
76 76
         // Where to look for view templates not mapped above
77 77
         'template_path_stack' => array(
78
-            __DIR__ . '/../view',
78
+            __DIR__.'/../view',
79 79
         ),
80 80
     ),
81 81
     'form_elements' => array(
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
             'organizations' => array(
159 159
                 'label' => 'Organizations',
160 160
                 'route' => 'lang/organizations',
161
-                'order' => 65,                             // allows to order the menu items
162
-                'resource' => 'route/lang/organizations',  // if a resource is defined, the acl will be applied.
161
+                'order' => 65, // allows to order the menu items
162
+                'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied.
163 163
 
164 164
                 'pages' => array(
165 165
                     'list' => array(
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Entity/WorkflowSettingsInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Entity/Organization.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      */
336 336
     public function getPermissionsResourceId()
337 337
     {
338
-        return 'organization:' . $this->getId();
338
+        return 'organization:'.$this->getId();
339 339
     }
340 340
 
341 341
     /**
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
      * @param string $role
548 548
      * @return ArrayCollection
549 549
      */
550
-    public function getEmployeesByRole($role){
550
+    public function getEmployeesByRole($role) {
551 551
         $employees = new ArrayCollection();
552 552
 
553 553
         /* @var \Organizations\Entity\Employee $employee */
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
      */
666 666
     public function getTemplate()
667 667
     {
668
-        if (null === $this->template){
668
+        if (null === $this->template) {
669 669
             $this->template = new Template();
670 670
         }
671 671
         return $this->template;
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
      */
679 679
     public function setTemplate(TemplateInterface $template)
680 680
     {
681
-        $this->template=$template;
681
+        $this->template = $template;
682 682
         return $this;
683 683
     }
684 684
 
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
      *
688 688
      * @return WorkflowSettings|WorkflowSettingsInterface
689 689
      */
690
-    public function getWorkflowSettings(){
690
+    public function getWorkflowSettings() {
691 691
         if (null == $this->workflowSettings) {
692 692
             $this->workflowSettings = new WorkflowSettings();
693 693
         }
@@ -701,8 +701,8 @@  discard block
 block discarded – undo
701 701
      *
702 702
      * @return self
703 703
      */
704
-    public function setWorkflowSettings($workflowSettings){
705
-        $this->workflowSettings=$workflowSettings;
704
+    public function setWorkflowSettings($workflowSettings) {
705
+        $this->workflowSettings = $workflowSettings;
706 706
         return $this;
707 707
     }
708 708
 }
709 709
\ No newline at end of file
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Entity/WorkflowSettings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
module/Applications/src/Applications/Entity/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/Events/ApplicationEvent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,17 +30,17 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/StatusChange.php 1 patch
Spacing   +10 added lines, -10 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
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $mail->setSubject($post['mailSubject']);
140 140
         $mail->setBody($post['mailText']);
141
-        $mail->setTo($this->getRecipients($this->application,$status));
141
+        $mail->setTo($this->getRecipients($this->application, $status));
142 142
 
143 143
         if ($from = $this->application->getJob()->getContactEmail()) {
144 144
             $mail->setFrom($from, $this->application->getJob()->getCompany());
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      *
162 162
      * @return AddressList
163 163
      */
164
-    protected function getRecipients( Application $application, $status) {
164
+    protected function getRecipients(Application $application, $status) {
165 165
 
166 166
         $job = $application->getJob();
167 167
         $organization = $job->getOrganization();
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
         $cc = new AddressList();
171 171
         $bcc = new AddressList();
172 172
 
173
-        switch($status) {
173
+        switch ($status) {
174 174
             case Status::INCOMING:
175 175
                 /* @var WorkflowSettings $workflow */
176 176
                 $workflow = $job->getOrganization()->getWorkflowSettings();
177 177
                 if ($workflow->getAcceptApplicationByDepartmentManager()) {
178 178
                     $departmentManagers = $job->getOrganization()->getEmployeesByRole(EmployeeInterface::ROLE_DEPARTMENT_MANAGER);
179
-                    foreach($departmentManagers as $employee ) { /* @var Employee $employee */
179
+                    foreach ($departmentManagers as $employee) { /* @var Employee $employee */
180 180
                         $to->add(
181 181
                             $employee->getUser()->getInfo()->getEmail(),
182 182
                             $employee->getUser()->getInfo()->getDisplayName(false)
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                 );
217 217
                 break;
218 218
             default:
219
-                throw new \InvalidArgumentException('Unknown status value: ' .$status);
219
+                throw new \InvalidArgumentException('Unknown status value: '.$status);
220 220
                 break;
221 221
         }
222 222
 
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/IndexController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/ApplyController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 throw new \RuntimeException('Invalid application id.');
94 94
             }
95 95
 
96
-            $action     = 'process';
96
+            $action = 'process';
97 97
 
98 98
             $routeMatch->setParam('action', $action);
99 99
         } else {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     {
185 185
         $this->response->setStatusCode(410);
186 186
         $model = new ViewModel(
187
-            [ 'content' => /*@translate*/ 'Invalid apply id']
187
+            ['content' => /*@translate*/ 'Invalid apply id']
188 188
         );
189 189
         $model->setTemplate('applications/error/not-found');
190 190
         return $model;
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
     public function indexAction()
194 194
     {
195 195
         /* @var \Applications\Form\Apply $form */
196
-        $form        = $this->container;
196
+        $form = $this->container;
197 197
         $serviceLocator = $this->getServiceLocator();
198 198
         $translator = $serviceLocator->get('Translator');
199 199
         /* @var \Auth\Form\SocialProfiles $profiles */
200 200
 
201
-        $profiles=$form->get('profiles');
201
+        $profiles = $form->get('profiles');
202 202
         /*
203 203
          * can we add the description to Applications\Form\Apply ?
204 204
          */
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         }
295 295
 
296 296
         if ('sendmail' == $this->params()->fromQuery('do')) {
297
-            $jobEntity         = $application->getJob();
297
+            $jobEntity = $application->getJob();
298 298
 
299 299
             $mailData = array(
300 300
                 'application' => $application,
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
             ->revoke($this->auth()->getUser(), PermissionsInterface::PERMISSION_CHANGE)
323 323
             ->inherit($application->getJob()->getPermissions());
324 324
 
325
-        $events   = $services->get('Applications/Events');
326
-        $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, [ 'application' => $application ]);
325
+        $events = $services->get('Applications/Events');
326
+        $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, ['application' => $application]);
327 327
 
328 328
         $model = new ViewModel(
329 329
             array(
Please login to merge, or discard this patch.