@@ -42,7 +42,7 @@ |
||
42 | 42 | $queryBuilder->field('preferredJob.desiredLocations.coordinates')->geoWithinCenter( |
43 | 43 | $coordinates[0], |
44 | 44 | $coordinates[1], |
45 | - (float)$params['d'] / 100 |
|
45 | + (float) $params['d'] / 100 |
|
46 | 46 | ); |
47 | 47 | } |
48 | 48 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | $queryBuilder/*->expr()*/->addOr($queryBuilder->expr()->field('permissions.view')->equals($this->user->getId())) |
51 | - ->addOr($queryBuilder->expr()->field('status.name')->equals(Status::PUBLIC_TO_ALL)) |
|
51 | + ->addOr($queryBuilder->expr()->field('status.name')->equals(Status::PUBLIC_TO_ALL)) |
|
52 | 52 | ; |
53 | 53 | //$q = $queryBuilder->getQuery()->debug(); |
54 | 54 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function __construct($status = self::NONPUBLIC) |
48 | 48 | { |
49 | 49 | if (!isset(static::$orderMap[$status])) { |
50 | - throw new \DomainException('Unknown status: ' . $status); |
|
50 | + throw new \DomainException('Unknown status: '.$status); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $this->name = $status; |
@@ -16,9 +16,9 @@ |
||
16 | 16 | interface StatusInterface extends EntityInterface |
17 | 17 | { |
18 | 18 | |
19 | - const NONPUBLIC = /*@translate*/ 'private'; |
|
19 | + const NONPUBLIC = /*@translate*/ 'private'; |
|
20 | 20 | |
21 | - const PUBLIC_TO_ALL = /*@translate*/ 'public to all'; |
|
21 | + const PUBLIC_TO_ALL = /*@translate*/ 'public to all'; |
|
22 | 22 | |
23 | 23 | public function __construct($status = self::NONPUBLIC); |
24 | 24 |
@@ -25,6 +25,9 @@ |
||
25 | 25 | |
26 | 26 | protected $createEntityCallback; |
27 | 27 | |
28 | + /** |
|
29 | + * @param \Closure $callback |
|
30 | + */ |
|
28 | 31 | public function __construct($repository, $callback) |
29 | 32 | { |
30 | 33 | $this->repository = $repository; |
@@ -90,16 +90,16 @@ |
||
90 | 90 | /* @var \Zend\Paginator\Paginator $paginator */ |
91 | 91 | /* @var CreatePaginatorEvent $event */ |
92 | 92 | $events = $this->serviceManager->get('Core/CreatePaginator/Events'); |
93 | - $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR,$this,[ |
|
93 | + $event = $events->getEvent(CreatePaginatorEvent::EVENT_CREATE_PAGINATOR, $this, [ |
|
94 | 94 | 'paginatorParams' => $params, |
95 | 95 | 'paginators' => $paginators, |
96 | 96 | 'paginatorName' => $paginatorName |
97 | 97 | ]); |
98 | 98 | $events->trigger($event); |
99 | 99 | $paginator = $event->getPaginator(); |
100 | - if(!$paginator instanceof Paginator){ |
|
100 | + if (!$paginator instanceof Paginator) { |
|
101 | 101 | // no paginator created by listener, so let's create default paginator |
102 | - $paginator = $paginators->get($paginatorName,$params); |
|
102 | + $paginator = $paginators->get($paginatorName, $params); |
|
103 | 103 | } |
104 | 104 | $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1) |
105 | 105 | ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10) |
@@ -102,8 +102,8 @@ |
||
102 | 102 | $paginator = $paginators->get($paginatorName,$params); |
103 | 103 | } |
104 | 104 | $paginator->setCurrentPageNumber(isset($params['page']) ? $params['page'] : 1) |
105 | - ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10) |
|
106 | - ->setPageRange(isset($params['range']) ? $params['range'] : 5); |
|
105 | + ->setItemCountPerPage(isset($params['count']) ? $params['count'] : 10) |
|
106 | + ->setPageRange(isset($params['range']) ? $params['range'] : 5); |
|
107 | 107 | |
108 | 108 | return $paginator; |
109 | 109 |
@@ -125,16 +125,16 @@ |
||
125 | 125 | |
126 | 126 | public function setParams($params) |
127 | 127 | { |
128 | - if(is_array($params)){ |
|
129 | - if(isset($params['paginatorParams'])){ |
|
128 | + if (is_array($params)) { |
|
129 | + if (isset($params['paginatorParams'])) { |
|
130 | 130 | $this->setPaginatorParams($params['paginatorParams']); |
131 | 131 | unset($params['paginatorParams']); |
132 | 132 | } |
133 | - if(isset($params['paginators'])){ |
|
133 | + if (isset($params['paginators'])) { |
|
134 | 134 | $this->setPaginators($params['paginators']); |
135 | 135 | unset($params['paginators']); |
136 | 136 | } |
137 | - if(isset($params['paginatorName'])){ |
|
137 | + if (isset($params['paginatorName'])) { |
|
138 | 138 | $this->setPaginatorName($params['paginatorName']); |
139 | 139 | unset($params['paginatorName']); |
140 | 140 | } |
@@ -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 |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'allow' => array( |
152 | 152 | 'route/lang/organizations', |
153 | 153 | 'Organizations/InviteEmployee', |
154 | - 'Entity/Organization' => [ 'edit' => 'Organizations/Write' ], |
|
154 | + 'Entity/Organization' => ['edit' => 'Organizations/Write'], |
|
155 | 155 | ), |
156 | 156 | ), |
157 | 157 | ), |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | 'organizations' => array( |
168 | 168 | 'label' => 'Organizations', |
169 | 169 | 'route' => 'lang/organizations', |
170 | - 'order' => 65, // allows to order the menu items |
|
171 | - 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
170 | + 'order' => 65, // allows to order the menu items |
|
171 | + 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
172 | 172 | |
173 | 173 | 'pages' => array( |
174 | 174 | 'list' => array( |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | 'view_manager' => array( |
69 | 69 | // Map template to files. Speeds up the lookup through the template stack. |
70 | 70 | 'template_map' => array( |
71 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
72 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
73 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
74 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
75 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
76 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
77 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
71 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
72 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
73 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
74 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
75 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
76 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
77 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
78 | 78 | 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
79 | 79 | ), |
80 | 80 | // Where to look for view templates not mapped above |
@@ -84,20 +84,20 @@ discard block |
||
84 | 84 | ), |
85 | 85 | 'form_elements' => array( |
86 | 86 | 'invokables' => array( |
87 | - 'Organizations/form' => 'Organizations\Form\Organizations', |
|
88 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
89 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
90 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
91 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
92 | - 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
93 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
94 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
95 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
96 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
97 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
98 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
99 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
100 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
87 | + 'Organizations/form' => 'Organizations\Form\Organizations', |
|
88 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
89 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
90 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
91 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
92 | + 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
93 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
94 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
95 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
96 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
97 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
98 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
99 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
100 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
101 | 101 | |
102 | 102 | ), |
103 | 103 | 'factories' => array( |
@@ -187,13 +187,13 @@ discard block |
||
187 | 187 | ), |
188 | 188 | 'service_manager' => [ |
189 | 189 | 'invokables' => [ |
190 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
190 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
191 | 191 | ], |
192 | 192 | 'factories' => [ |
193 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
194 | - 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
195 | - 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
196 | - 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory' |
|
193 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
194 | + 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
195 | + 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
196 | + 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory' |
|
197 | 197 | ] |
198 | 198 | ], |
199 | 199 | 'event_manager' => [ |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function getParent($returnSelf = false) |
235 | 235 | { |
236 | - return $this->parent ? : ($returnSelf ? $this : null); |
|
236 | + return $this->parent ?: ($returnSelf ? $this : null); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | */ |
466 | 466 | public function getPermissionsResourceId() |
467 | 467 | { |
468 | - return 'organization:' . $this->getId(); |
|
468 | + return 'organization:'.$this->getId(); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | /** |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * |
35 | 35 | * @var array $attachmentsMimeType |
36 | 36 | */ |
37 | - protected $attachmentsMimeType = array('image','applications/pdf', |
|
37 | + protected $attachmentsMimeType = array('image', 'applications/pdf', |
|
38 | 38 | 'application/x-pdf', |
39 | 39 | 'application/acrobat', |
40 | 40 | 'applications/vnd.pdf', |
@@ -93,7 +93,7 @@ |
||
93 | 93 | /** |
94 | 94 | * Gets the the maximum number of allowed attachments |
95 | 95 | * |
96 | - * @return string |
|
96 | + * @return integer |
|
97 | 97 | */ |
98 | 98 | public function getAttachmentsCount() |
99 | 99 | { |