@@ -27,7 +27,7 @@ |
||
27 | 27 | * |
28 | 28 | * @param ServiceLocatorInterface $serviceLocator |
29 | 29 | * |
30 | - * @return mixed |
|
30 | + * @return StatusChange |
|
31 | 31 | */ |
32 | 32 | public function createService(ServiceLocatorInterface $serviceLocator) |
33 | 33 | { |
@@ -157,7 +157,7 @@ |
||
157 | 157 | |
158 | 158 | /** |
159 | 159 | * @param Application $application |
160 | - * @param $status |
|
160 | + * @param string $status |
|
161 | 161 | * |
162 | 162 | * @return AddressList |
163 | 163 | */ |
@@ -68,7 +68,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -64,13 +64,13 @@ discard block |
||
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', |
|
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 | 74 | 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
75 | 75 | ), |
76 | 76 | // Where to look for view templates not mapped above |
@@ -80,20 +80,20 @@ discard block |
||
80 | 80 | ), |
81 | 81 | 'form_elements' => array( |
82 | 82 | 'invokables' => array( |
83 | - 'Organizations/form' => 'Organizations\Form\Organizations', |
|
84 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
85 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
86 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
87 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
88 | - 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
89 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
90 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
91 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
92 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
93 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
94 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
95 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
96 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
83 | + 'Organizations/form' => 'Organizations\Form\Organizations', |
|
84 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
85 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
86 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
87 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
88 | + 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
89 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
90 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
91 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
92 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
93 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
94 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
95 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
96 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
97 | 97 | |
98 | 98 | ), |
99 | 99 | 'factories' => array( |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | ), |
14 | 14 | ), |
15 | 15 | 'annotation' => array( |
16 | - 'paths' => array( __DIR__ . '/../src/Organizations/Entity') |
|
16 | + 'paths' => array(__DIR__.'/../src/Organizations/Entity') |
|
17 | 17 | ), |
18 | 18 | ), |
19 | 19 | 'eventmanager' => array( |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'translation_file_patterns' => array( |
40 | 40 | array( |
41 | 41 | 'type' => 'gettext', |
42 | - 'base_dir' => __DIR__ . '/../language', |
|
42 | + 'base_dir' => __DIR__.'/../language', |
|
43 | 43 | 'pattern' => '%s.mo', |
44 | 44 | ), |
45 | 45 | ), |
@@ -67,18 +67,18 @@ discard block |
||
67 | 67 | 'view_manager' => array( |
68 | 68 | // Map template to files. Speeds up the lookup through the template stack. |
69 | 69 | 'template_map' => array( |
70 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
71 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
72 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
73 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
74 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
75 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
76 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
77 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
70 | + 'organizations/index/edit' => __DIR__.'/../view/organizations/index/form.phtml', |
|
71 | + 'organizations/form/employees-fieldset' => __DIR__.'/../view/form/employees-fieldset.phtml', |
|
72 | + 'organizations/form/employee-fieldset' => __DIR__.'/../view/form/employee-fieldset.phtml', |
|
73 | + 'organizations/form/invite-employee-bar' => __DIR__.'/../view/form/invite-employee-bar.phtml', |
|
74 | + 'organizations/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml', |
|
75 | + 'organizations/error/invite' => __DIR__.'/../view/error/invite.phtml', |
|
76 | + 'organizations/mail/invite-employee' => __DIR__.'/../view/mail/invite-employee.phtml', |
|
77 | + 'organizations/form/workflow-fieldset' => __DIR__.'/../view/form/workflow-fieldset.phtml', |
|
78 | 78 | ), |
79 | 79 | // Where to look for view templates not mapped above |
80 | 80 | 'template_path_stack' => array( |
81 | - __DIR__ . '/../view', |
|
81 | + __DIR__.'/../view', |
|
82 | 82 | ), |
83 | 83 | ), |
84 | 84 | 'form_elements' => array( |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | 'allow' => array( |
140 | 140 | 'Entity/OrganizationImage', |
141 | 141 | 'route/lang/organizations/invite', |
142 | - 'Organizations/InviteEmployee' => [ 'accept' ], |
|
142 | + 'Organizations/InviteEmployee' => ['accept'], |
|
143 | 143 | ), |
144 | 144 | 'deny' => array( |
145 | 145 | 'route/lang/organizations', |
146 | - 'Organizations/InviteEmployee' => [ 'invite' ], |
|
146 | + 'Organizations/InviteEmployee' => ['invite'], |
|
147 | 147 | ), |
148 | 148 | ), |
149 | 149 | // recruiters are allowed to view their companies |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | 'organizations' => array( |
165 | 165 | 'label' => 'Organizations', |
166 | 166 | 'route' => 'lang/organizations', |
167 | - 'order' => 65, // allows to order the menu items |
|
168 | - 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
167 | + 'order' => 65, // allows to order the menu items |
|
168 | + 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
169 | 169 | |
170 | 170 | 'pages' => array( |
171 | 171 | 'list' => array( |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 |
@@ -335,7 +335,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -40,9 +40,9 @@ discard block |
||
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 |
||
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; |
@@ -142,7 +142,7 @@ |
||
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 | } |
@@ -30,17 +30,17 @@ discard block |
||
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 |
||
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 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | - * @param $notification |
|
141 | + * @param string $notification |
|
142 | 142 | * |
143 | 143 | * @return $this |
144 | 144 | */ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * @return mixed |
|
171 | + * @return string |
|
172 | 172 | */ |
173 | 173 | public function getStatus() |
174 | 174 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | - * @return mixed |
|
179 | + * @return boolean |
|
180 | 180 | */ |
181 | 181 | public function isPostRequest() |
182 | 182 | { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $params->set('by', 'me'); |
41 | 41 | } |
42 | 42 | |
43 | - //default sorting |
|
43 | + //default sorting |
|
44 | 44 | if (!isset($params['sort'])) { |
45 | 45 | $params['sort']="-date"; |
46 | 46 | } |
@@ -42,10 +42,10 @@ |
||
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 |