@@ -24,7 +24,7 @@ |
||
24 | 24 | public function getHydrator() |
25 | 25 | { |
26 | 26 | if (!$this->hydrator) { |
27 | - $hydrator = new EntityHydrator(); |
|
27 | + $hydrator = new EntityHydrator(); |
|
28 | 28 | $this->setHydrator($hydrator); |
29 | 29 | } |
30 | 30 | return $this->hydrator; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | 'controllers' => [ |
51 | 51 | 'factories' => [ |
52 | - 'Organizations/InviteEmployee' => \Organizations\Factory\Controller\InviteEmployeeControllerFactory::class, |
|
52 | + 'Organizations/InviteEmployee' => \Organizations\Factory\Controller\InviteEmployeeControllerFactory::class, |
|
53 | 53 | 'Organizations/Index' => 'Organizations\Factory\Controller\IndexControllerFactory', |
54 | 54 | 'Organizations/Profile' => 'Organizations\Factory\Controller\ProfileControllerFactory' |
55 | 55 | ] |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | 'view_manager' => [ |
67 | 67 | // Map template to files. Speeds up the lookup through the template stack. |
68 | 68 | 'template_map' => [ |
69 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
69 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | + 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
77 | 77 | ], |
78 | 78 | // Where to look for view templates not mapped above |
79 | 79 | 'template_path_stack' => [ |
@@ -82,24 +82,24 @@ discard block |
||
82 | 82 | ], |
83 | 83 | 'form_elements' => [ |
84 | 84 | 'invokables' => [ |
85 | - 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
86 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
87 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
88 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
89 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
90 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
91 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
92 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
93 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
94 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
95 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
96 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
97 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
98 | - 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
99 | - 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
85 | + 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
86 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
87 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
88 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
89 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
90 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
91 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
92 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
93 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
94 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
95 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
96 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
97 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
98 | + 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
99 | + 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
100 | 100 | ], |
101 | 101 | 'factories' => [ |
102 | - 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
|
102 | + 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
|
103 | 103 | 'Organizations/Image' => \Organizations\Form\LogoImageFactory::class, |
104 | 104 | 'Organizations/EmployeesFieldset' => 'Organizations\Factory\Form\EmployeesFieldsetFactory', |
105 | 105 | 'Organizations/EmployeeFieldset' => 'Organizations\Factory\Form\EmployeeFieldsetFactory', |
@@ -207,13 +207,13 @@ discard block |
||
207 | 207 | |
208 | 208 | 'service_manager' => [ |
209 | 209 | 'invokables' => [ |
210 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
210 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
211 | 211 | ], |
212 | 212 | 'factories' => [ |
213 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
214 | - 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
215 | - 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
216 | - 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
213 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
214 | + 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
215 | + 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
216 | + 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
217 | 217 | ], |
218 | 218 | ], |
219 | 219 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | ], |
14 | 14 | ], |
15 | 15 | 'annotation' => [ |
16 | - 'paths' => [ __DIR__ . '/../src/Organizations/Entity'] |
|
16 | + 'paths' => [__DIR__.'/../src/Organizations/Entity'] |
|
17 | 17 | ], |
18 | 18 | ], |
19 | 19 | 'eventmanager' => [ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | 'translation_file_patterns' => [ |
41 | 41 | [ |
42 | 42 | 'type' => 'gettext', |
43 | - 'base_dir' => __DIR__ . '/../language', |
|
43 | + 'base_dir' => __DIR__.'/../language', |
|
44 | 44 | 'pattern' => '%s.mo', |
45 | 45 | ], |
46 | 46 | ], |
@@ -66,18 +66,18 @@ discard block |
||
66 | 66 | 'view_manager' => [ |
67 | 67 | // Map template to files. Speeds up the lookup through the template stack. |
68 | 68 | 'template_map' => [ |
69 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
69 | + 'organizations/index/edit' => __DIR__.'/../view/organizations/index/form.phtml', |
|
70 | + 'organizations/form/employees-fieldset' => __DIR__.'/../view/form/employees-fieldset.phtml', |
|
71 | + 'organizations/form/employee-fieldset' => __DIR__.'/../view/form/employee-fieldset.phtml', |
|
72 | + 'organizations/form/invite-employee-bar' => __DIR__.'/../view/form/invite-employee-bar.phtml', |
|
73 | + 'organizations/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml', |
|
74 | + 'organizations/error/invite' => __DIR__.'/../view/error/invite.phtml', |
|
75 | + 'organizations/mail/invite-employee' => __DIR__.'/../view/mail/invite-employee.phtml', |
|
76 | + 'organizations/form/workflow-fieldset' => __DIR__.'/../view/form/workflow-fieldset.phtml', |
|
77 | 77 | ], |
78 | 78 | // Where to look for view templates not mapped above |
79 | 79 | 'template_path_stack' => [ |
80 | - __DIR__ . '/../view', |
|
80 | + __DIR__.'/../view', |
|
81 | 81 | ], |
82 | 82 | ], |
83 | 83 | 'form_elements' => [ |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | 'allow' => [ |
156 | 156 | 'Entity/OrganizationImage', |
157 | 157 | 'route/lang/organizations/invite', |
158 | - 'Organizations/InviteEmployee' => [ 'accept' ], |
|
158 | + 'Organizations/InviteEmployee' => ['accept'], |
|
159 | 159 | 'route/lang/organizations/profile', |
160 | 160 | 'route/lang/organizations/profileDetail', |
161 | 161 | ], |
162 | 162 | 'deny' => [ |
163 | 163 | 'route/lang/organizations', |
164 | - 'Organizations/InviteEmployee' => [ 'invite' ], |
|
164 | + 'Organizations/InviteEmployee' => ['invite'], |
|
165 | 165 | ], |
166 | 166 | ], |
167 | 167 | // recruiters are allowed to view their companies |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | 'allow' => [ |
170 | 170 | 'route/lang/organizations', |
171 | 171 | 'Organizations/InviteEmployee', |
172 | - 'Entity/Organization' => [ 'edit' => 'Organizations/Write' ], |
|
172 | + 'Entity/Organization' => ['edit' => 'Organizations/Write'], |
|
173 | 173 | 'route/lang/organizations/profile', |
174 | 174 | 'route/lang/organizations/profileDetail' |
175 | 175 | ], |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | 'organizations' => [ |
188 | 188 | 'label' => 'Organizations', |
189 | 189 | 'route' => 'lang/organizations', |
190 | - 'order' => 65, // allows to order the menu items |
|
191 | - 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
190 | + 'order' => 65, // allows to order the menu items |
|
191 | + 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
192 | 192 | |
193 | 193 | 'pages' => [ |
194 | 194 | 'list' => [ |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | private $orgRepo; |
37 | 37 | |
38 | - public function __construct( |
|
38 | + public function __construct( |
|
39 | 39 | OrganizationRepository $orgRepo |
40 | 40 | ) |
41 | 41 | { |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param string $name |
|
56 | + */ |
|
54 | 57 | public function buildUrl($name, array $params=array(), array $options=array()) |
55 | 58 | { |
56 | 59 | $defaults = ['lang'=>'en']; |
@@ -71,7 +74,7 @@ discard block |
||
71 | 74 | } |
72 | 75 | |
73 | 76 | /** |
74 | - * @param $id |
|
77 | + * @param string $id |
|
75 | 78 | * @return mixed|object |
76 | 79 | */ |
77 | 80 | public function getService($id) |
@@ -80,7 +83,7 @@ discard block |
||
80 | 83 | } |
81 | 84 | |
82 | 85 | /** |
83 | - * @param $id |
|
86 | + * @param string $id |
|
84 | 87 | * |
85 | 88 | * @return RepositoryInterface |
86 | 89 | */ |
@@ -18,43 +18,43 @@ discard block |
||
18 | 18 | |
19 | 19 | trait CommonContextTrait |
20 | 20 | { |
21 | - /** |
|
22 | - * @var MinkContext |
|
23 | - */ |
|
24 | - protected $minkContext; |
|
21 | + /** |
|
22 | + * @var MinkContext |
|
23 | + */ |
|
24 | + protected $minkContext; |
|
25 | 25 | |
26 | - /** |
|
27 | - * @var CoreContext |
|
28 | - */ |
|
29 | - protected $coreContext; |
|
26 | + /** |
|
27 | + * @var CoreContext |
|
28 | + */ |
|
29 | + protected $coreContext; |
|
30 | 30 | |
31 | - /** |
|
32 | - * @var UserContext |
|
33 | - */ |
|
34 | - protected $userContext; |
|
31 | + /** |
|
32 | + * @var UserContext |
|
33 | + */ |
|
34 | + protected $userContext; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @var SummaryFormContext |
|
38 | - */ |
|
39 | - protected $summaryFormContext; |
|
36 | + /** |
|
37 | + * @var SummaryFormContext |
|
38 | + */ |
|
39 | + protected $summaryFormContext; |
|
40 | 40 | |
41 | - /** |
|
42 | - * @BeforeScenario |
|
43 | - * |
|
44 | - * @param BeforeScenarioScope $scope |
|
45 | - */ |
|
46 | - final public function gatherContexts(BeforeScenarioScope $scope) |
|
47 | - { |
|
48 | - $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class); |
|
49 | - $this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class); |
|
50 | - $this->userContext = $scope->getEnvironment()->getContext(UserContext::class); |
|
51 | - $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class); |
|
52 | - } |
|
41 | + /** |
|
42 | + * @BeforeScenario |
|
43 | + * |
|
44 | + * @param BeforeScenarioScope $scope |
|
45 | + */ |
|
46 | + final public function gatherContexts(BeforeScenarioScope $scope) |
|
47 | + { |
|
48 | + $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class); |
|
49 | + $this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class); |
|
50 | + $this->userContext = $scope->getEnvironment()->getContext(UserContext::class); |
|
51 | + $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class); |
|
52 | + } |
|
53 | 53 | |
54 | - public function buildUrl($name, array $params=array(), array $options=array()) |
|
55 | - { |
|
56 | - $defaults = ['lang'=>'en']; |
|
57 | - $params = array_merge($defaults,$params); |
|
54 | + public function buildUrl($name, array $params=array(), array $options=array()) |
|
55 | + { |
|
56 | + $defaults = ['lang'=>'en']; |
|
57 | + $params = array_merge($defaults,$params); |
|
58 | 58 | /* @var Url $urlHelper */ |
59 | 59 | $urlHelper = $this |
60 | 60 | ->getService('ViewHelperManager') |
@@ -63,36 +63,36 @@ discard block |
||
63 | 63 | $url = $urlHelper($name,$params,$options); |
64 | 64 | |
65 | 65 | return $this->coreContext->generateUrl($url); |
66 | - } |
|
66 | + } |
|
67 | 67 | |
68 | - public function visit($url) |
|
69 | - { |
|
70 | - $this->coreContext->iVisit($url); |
|
71 | - } |
|
68 | + public function visit($url) |
|
69 | + { |
|
70 | + $this->coreContext->iVisit($url); |
|
71 | + } |
|
72 | 72 | |
73 | - /** |
|
74 | - * @param $id |
|
75 | - * @return mixed|object |
|
76 | - */ |
|
77 | - public function getService($id) |
|
78 | - { |
|
79 | - return $this->coreContext->getServiceManager()->get($id); |
|
80 | - } |
|
73 | + /** |
|
74 | + * @param $id |
|
75 | + * @return mixed|object |
|
76 | + */ |
|
77 | + public function getService($id) |
|
78 | + { |
|
79 | + return $this->coreContext->getServiceManager()->get($id); |
|
80 | + } |
|
81 | 81 | |
82 | - /** |
|
83 | - * @param $id |
|
84 | - * |
|
85 | - * @return RepositoryInterface |
|
86 | - */ |
|
87 | - public function getRepository($id) |
|
88 | - { |
|
89 | - return $this->coreContext->getRepositories()->get($id); |
|
90 | - } |
|
82 | + /** |
|
83 | + * @param $id |
|
84 | + * |
|
85 | + * @return RepositoryInterface |
|
86 | + */ |
|
87 | + public function getRepository($id) |
|
88 | + { |
|
89 | + return $this->coreContext->getRepositories()->get($id); |
|
90 | + } |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @return UserContext |
94 | 94 | */ |
95 | - public function getUserContext() |
|
95 | + public function getUserContext() |
|
96 | 96 | { |
97 | 97 | return $this->userContext; |
98 | 98 | } |
@@ -51,16 +51,16 @@ |
||
51 | 51 | $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class); |
52 | 52 | } |
53 | 53 | |
54 | - public function buildUrl($name, array $params=array(), array $options=array()) |
|
54 | + public function buildUrl($name, array $params = array(), array $options = array()) |
|
55 | 55 | { |
56 | 56 | $defaults = ['lang'=>'en']; |
57 | - $params = array_merge($defaults,$params); |
|
57 | + $params = array_merge($defaults, $params); |
|
58 | 58 | /* @var Url $urlHelper */ |
59 | 59 | $urlHelper = $this |
60 | 60 | ->getService('ViewHelperManager') |
61 | 61 | ->get('url') |
62 | 62 | ; |
63 | - $url = $urlHelper($name,$params,$options); |
|
63 | + $url = $urlHelper($name, $params, $options); |
|
64 | 64 | |
65 | 65 | return $this->coreContext->generateUrl($url); |
66 | 66 | } |
@@ -14,26 +14,26 @@ |
||
14 | 14 | |
15 | 15 | class SettingsContext implements Context |
16 | 16 | { |
17 | - use CommonContextTrait; |
|
17 | + use CommonContextTrait; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @Given I go to settings page |
|
21 | - */ |
|
22 | - public function iGoToSettingsPage() |
|
23 | - { |
|
24 | - //$this->visit('/settings'); |
|
19 | + /** |
|
20 | + * @Given I go to settings page |
|
21 | + */ |
|
22 | + public function iGoToSettingsPage() |
|
23 | + { |
|
24 | + //$this->visit('/settings'); |
|
25 | 25 | $url = $this->buildUrl('lang/settings'); |
26 | 26 | $this->visit($url); |
27 | - } |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * @Given I go to email template settings page |
|
31 | - */ |
|
32 | - public function iGoToEmailTemplatePage() |
|
33 | - { |
|
34 | - $url = $this->buildUrl('lang/settings',[ |
|
35 | - 'module' => 'Applications' |
|
29 | + /** |
|
30 | + * @Given I go to email template settings page |
|
31 | + */ |
|
32 | + public function iGoToEmailTemplatePage() |
|
33 | + { |
|
34 | + $url = $this->buildUrl('lang/settings',[ |
|
35 | + 'module' => 'Applications' |
|
36 | 36 | ]); |
37 | - $this->visit($url); |
|
38 | - } |
|
37 | + $this->visit($url); |
|
38 | + } |
|
39 | 39 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function iGoToEmailTemplatePage() |
33 | 33 | { |
34 | - $url = $this->buildUrl('lang/settings',[ |
|
34 | + $url = $this->buildUrl('lang/settings', [ |
|
35 | 35 | 'module' => 'Applications' |
36 | 36 | ]); |
37 | 37 | $this->visit($url); |
@@ -22,37 +22,37 @@ |
||
22 | 22 | */ |
23 | 23 | class ApplicationContext implements Context |
24 | 24 | { |
25 | - use CommonContextTrait; |
|
25 | + use CommonContextTrait; |
|
26 | 26 | |
27 | - /** |
|
28 | - * @Given I apply for :title job |
|
29 | - * |
|
30 | - * @param string $title |
|
31 | - * @throws \Exception when the titled job not exists |
|
32 | - */ |
|
33 | - public function iApplyAJob($title) |
|
34 | - { |
|
35 | - /* @var $repo JobRepository */ |
|
36 | - $repo = $this->getRepository('Jobs/Job'); |
|
37 | - $job = $repo->findOneBy(['title' => $title]); |
|
38 | - if(!$job instanceof Job){ |
|
39 | - throw new \Exception('There is no job titled: "'.$title.'"'); |
|
40 | - } |
|
41 | - $job->setApplyId($job->getId()); |
|
42 | - $repo->store($job); |
|
27 | + /** |
|
28 | + * @Given I apply for :title job |
|
29 | + * |
|
30 | + * @param string $title |
|
31 | + * @throws \Exception when the titled job not exists |
|
32 | + */ |
|
33 | + public function iApplyAJob($title) |
|
34 | + { |
|
35 | + /* @var $repo JobRepository */ |
|
36 | + $repo = $this->getRepository('Jobs/Job'); |
|
37 | + $job = $repo->findOneBy(['title' => $title]); |
|
38 | + if(!$job instanceof Job){ |
|
39 | + throw new \Exception('There is no job titled: "'.$title.'"'); |
|
40 | + } |
|
41 | + $job->setApplyId($job->getId()); |
|
42 | + $repo->store($job); |
|
43 | 43 | |
44 | - $url = $this->buildUrl('lang/apply',[ |
|
45 | - 'applyId' => $job->getApplyId() |
|
44 | + $url = $this->buildUrl('lang/apply',[ |
|
45 | + 'applyId' => $job->getApplyId() |
|
46 | 46 | ]); |
47 | - $this->visit($url); |
|
48 | - } |
|
47 | + $this->visit($url); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @Given I visit job categories |
|
52 | - */ |
|
53 | - public function visitJobsCategories() |
|
54 | - { |
|
55 | - $url = '/admin/jobs/categories'; |
|
56 | - $this->visit($url); |
|
57 | - } |
|
50 | + /** |
|
51 | + * @Given I visit job categories |
|
52 | + */ |
|
53 | + public function visitJobsCategories() |
|
54 | + { |
|
55 | + $url = '/admin/jobs/categories'; |
|
56 | + $this->visit($url); |
|
57 | + } |
|
58 | 58 | } |
@@ -35,13 +35,13 @@ |
||
35 | 35 | /* @var $repo JobRepository */ |
36 | 36 | $repo = $this->getRepository('Jobs/Job'); |
37 | 37 | $job = $repo->findOneBy(['title' => $title]); |
38 | - if(!$job instanceof Job){ |
|
38 | + if (!$job instanceof Job) { |
|
39 | 39 | throw new \Exception('There is no job titled: "'.$title.'"'); |
40 | 40 | } |
41 | 41 | $job->setApplyId($job->getId()); |
42 | 42 | $repo->store($job); |
43 | 43 | |
44 | - $url = $this->buildUrl('lang/apply',[ |
|
44 | + $url = $this->buildUrl('lang/apply', [ |
|
45 | 45 | 'applyId' => $job->getApplyId() |
46 | 46 | ]); |
47 | 47 | $this->visit($url); |
@@ -22,23 +22,23 @@ |
||
22 | 22 | */ |
23 | 23 | class CvContext implements Context |
24 | 24 | { |
25 | - use CommonContextTrait; |
|
25 | + use CommonContextTrait; |
|
26 | 26 | |
27 | 27 | |
28 | - /** |
|
29 | - * @Given I go to manage my resume page |
|
30 | - */ |
|
31 | - public function iGoToManageResumePage() |
|
32 | - { |
|
33 | - $url = $this->buildUrl('lang/my-cv'); |
|
34 | - $this->visit($url); |
|
35 | - } |
|
28 | + /** |
|
29 | + * @Given I go to manage my resume page |
|
30 | + */ |
|
31 | + public function iGoToManageResumePage() |
|
32 | + { |
|
33 | + $url = $this->buildUrl('lang/my-cv'); |
|
34 | + $this->visit($url); |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * @When I click edit on my personal information |
|
39 | - */ |
|
40 | - public function iClickEditOnPersonalInformations() |
|
41 | - { |
|
42 | - $this->summaryFormContext->iClickEditOnForm('resumePersonalInformations'); |
|
43 | - } |
|
37 | + /** |
|
38 | + * @When I click edit on my personal information |
|
39 | + */ |
|
40 | + public function iClickEditOnPersonalInformations() |
|
41 | + { |
|
42 | + $this->summaryFormContext->iClickEditOnForm('resumePersonalInformations'); |
|
43 | + } |
|
44 | 44 | } |
@@ -27,48 +27,48 @@ discard block |
||
27 | 27 | */ |
28 | 28 | class LazyControllerFactory implements AbstractFactoryInterface |
29 | 29 | { |
30 | - protected $aliases = [ |
|
31 | - FormElementManager::class => 'FormElementManager', |
|
32 | - ValidatorPluginManager::class => 'ValidatorManager', |
|
33 | - Translator::class => 'translator', |
|
34 | - ModuleManagerInterface::class => 'ModuleManager', |
|
35 | - EventManager::class => 'Core/EventManager', |
|
30 | + protected $aliases = [ |
|
31 | + FormElementManager::class => 'FormElementManager', |
|
32 | + ValidatorPluginManager::class => 'ValidatorManager', |
|
33 | + Translator::class => 'translator', |
|
34 | + ModuleManagerInterface::class => 'ModuleManager', |
|
35 | + EventManager::class => 'Core/EventManager', |
|
36 | 36 | RepositoryService::class => 'repositories', |
37 | - ]; |
|
37 | + ]; |
|
38 | 38 | |
39 | - public function canCreate( ContainerInterface $container, $requestedName ) |
|
40 | - { |
|
41 | - return strstr( $requestedName,'\Controller') !== false; |
|
42 | - } |
|
39 | + public function canCreate( ContainerInterface $container, $requestedName ) |
|
40 | + { |
|
41 | + return strstr( $requestedName,'\Controller') !== false; |
|
42 | + } |
|
43 | 43 | |
44 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
45 | - { |
|
44 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
45 | + { |
|
46 | 46 | $className = $this->getClassName($requestedName); |
47 | - $class = new \ReflectionClass($className); |
|
47 | + $class = new \ReflectionClass($className); |
|
48 | 48 | |
49 | - if( $constructor = $class->getConstructor() ) |
|
50 | - { |
|
51 | - if( $params = $constructor->getParameters() ) |
|
52 | - { |
|
53 | - $constructorArgs = []; |
|
54 | - foreach( $params as $p ) |
|
55 | - { |
|
56 | - $serviceName = ''; |
|
57 | - if( $p->getClass() ) { |
|
58 | - $serviceName = $p->getClass()->getName(); |
|
59 | - if (array_key_exists($serviceName, $this->aliases)) { |
|
60 | - $serviceName = $this->aliases[$serviceName]; |
|
61 | - } |
|
62 | - } |
|
63 | - else{ |
|
64 | - if( $p->getName() == 'config' ){ |
|
49 | + if( $constructor = $class->getConstructor() ) |
|
50 | + { |
|
51 | + if( $params = $constructor->getParameters() ) |
|
52 | + { |
|
53 | + $constructorArgs = []; |
|
54 | + foreach( $params as $p ) |
|
55 | + { |
|
56 | + $serviceName = ''; |
|
57 | + if( $p->getClass() ) { |
|
58 | + $serviceName = $p->getClass()->getName(); |
|
59 | + if (array_key_exists($serviceName, $this->aliases)) { |
|
60 | + $serviceName = $this->aliases[$serviceName]; |
|
61 | + } |
|
62 | + } |
|
63 | + else{ |
|
64 | + if( $p->getName() == 'config' ){ |
|
65 | 65 | $serviceName = 'config'; |
66 | 66 | } |
67 | - } |
|
67 | + } |
|
68 | 68 | |
69 | - if(!$container->has($serviceName)){ |
|
70 | - throw new ServiceNotCreatedException(sprintf( |
|
71 | - 'Can\'t create constructor argument "%s" for service "%s"', |
|
69 | + if(!$container->has($serviceName)){ |
|
70 | + throw new ServiceNotCreatedException(sprintf( |
|
71 | + 'Can\'t create constructor argument "%s" for service "%s"', |
|
72 | 72 | $p->getName(),$requestedName |
73 | 73 | )); |
74 | 74 | } |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName."; |
80 | 80 | exit; |
81 | 81 | } |
82 | - } |
|
83 | - return $class->newInstanceArgs($constructorArgs); |
|
84 | - } |
|
85 | - } |
|
82 | + } |
|
83 | + return $class->newInstanceArgs($constructorArgs); |
|
84 | + } |
|
85 | + } |
|
86 | 86 | |
87 | - return new $className; |
|
88 | - } |
|
87 | + return new $className; |
|
88 | + } |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Generate class name |
@@ -36,47 +36,47 @@ discard block |
||
36 | 36 | RepositoryService::class => 'repositories', |
37 | 37 | ]; |
38 | 38 | |
39 | - public function canCreate( ContainerInterface $container, $requestedName ) |
|
39 | + public function canCreate(ContainerInterface $container, $requestedName) |
|
40 | 40 | { |
41 | - return strstr( $requestedName,'\Controller') !== false; |
|
41 | + return strstr($requestedName, '\Controller') !== false; |
|
42 | 42 | } |
43 | 43 | |
44 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
44 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
45 | 45 | { |
46 | 46 | $className = $this->getClassName($requestedName); |
47 | 47 | $class = new \ReflectionClass($className); |
48 | 48 | |
49 | - if( $constructor = $class->getConstructor() ) |
|
49 | + if ($constructor = $class->getConstructor()) |
|
50 | 50 | { |
51 | - if( $params = $constructor->getParameters() ) |
|
51 | + if ($params = $constructor->getParameters()) |
|
52 | 52 | { |
53 | 53 | $constructorArgs = []; |
54 | - foreach( $params as $p ) |
|
54 | + foreach ($params as $p) |
|
55 | 55 | { |
56 | 56 | $serviceName = ''; |
57 | - if( $p->getClass() ) { |
|
57 | + if ($p->getClass()) { |
|
58 | 58 | $serviceName = $p->getClass()->getName(); |
59 | 59 | if (array_key_exists($serviceName, $this->aliases)) { |
60 | 60 | $serviceName = $this->aliases[$serviceName]; |
61 | 61 | } |
62 | 62 | } |
63 | - else{ |
|
64 | - if( $p->getName() == 'config' ){ |
|
63 | + else { |
|
64 | + if ($p->getName() == 'config') { |
|
65 | 65 | $serviceName = 'config'; |
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - if(!$container->has($serviceName)){ |
|
69 | + if (!$container->has($serviceName)) { |
|
70 | 70 | throw new ServiceNotCreatedException(sprintf( |
71 | 71 | 'Can\'t create constructor argument "%s" for service "%s"', |
72 | - $p->getName(),$requestedName |
|
72 | + $p->getName(), $requestedName |
|
73 | 73 | )); |
74 | 74 | } |
75 | 75 | try { |
76 | 76 | $constructorArgs[] = $container->get($serviceName); |
77 | 77 | } |
78 | 78 | catch (\Exception $x) { |
79 | - echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName."; |
|
79 | + echo __CLASS__." couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName."; |
|
80 | 80 | exit; |
81 | 81 | } |
82 | 82 | } |
@@ -95,10 +95,10 @@ discard block |
||
95 | 95 | */ |
96 | 96 | private function getClassName($requestedName) |
97 | 97 | { |
98 | - $exp = explode('/',$requestedName); |
|
98 | + $exp = explode('/', $requestedName); |
|
99 | 99 | |
100 | - $className = array_shift($exp).'\\Controller\\'.implode('\\',$exp).'Controller'; |
|
101 | - if(!class_exists($className)){ |
|
100 | + $className = array_shift($exp).'\\Controller\\'.implode('\\', $exp).'Controller'; |
|
101 | + if (!class_exists($className)) { |
|
102 | 102 | throw new ServiceNotCreatedException( |
103 | 103 | sprintf( |
104 | 104 | 'Can\'t find correct controller class for "%s"', |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | if (array_key_exists($serviceName, $this->aliases)) { |
60 | 60 | $serviceName = $this->aliases[$serviceName]; |
61 | 61 | } |
62 | - } |
|
63 | - else{ |
|
62 | + } else{ |
|
64 | 63 | if( $p->getName() == 'config' ){ |
65 | 64 | $serviceName = 'config'; |
66 | 65 | } |
@@ -74,8 +73,7 @@ discard block |
||
74 | 73 | } |
75 | 74 | try { |
76 | 75 | $constructorArgs[] = $container->get($serviceName); |
77 | - } |
|
78 | - catch (\Exception $x) { |
|
76 | + } catch (\Exception $x) { |
|
79 | 77 | echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName."; |
80 | 78 | exit; |
81 | 79 | } |
@@ -25,24 +25,24 @@ discard block |
||
25 | 25 | */ |
26 | 26 | class IndexController extends AbstractActionController |
27 | 27 | { |
28 | - /** @var DefaultListener */ |
|
29 | - private $defaultListener; |
|
28 | + /** @var DefaultListener */ |
|
29 | + private $defaultListener; |
|
30 | 30 | |
31 | - private $config; |
|
31 | + private $config; |
|
32 | 32 | |
33 | - /** |
|
34 | - * @var ModuleManager |
|
35 | - */ |
|
36 | - private $moduleManager; |
|
33 | + /** |
|
34 | + * @var ModuleManager |
|
35 | + */ |
|
36 | + private $moduleManager; |
|
37 | 37 | |
38 | - public function __construct( |
|
38 | + public function __construct( |
|
39 | 39 | ModuleManagerInterface $moduleManager, |
40 | 40 | $config |
41 | 41 | ) |
42 | - { |
|
43 | - $this->config = $config; |
|
44 | - $this->moduleManager = $moduleManager; |
|
45 | - } |
|
42 | + { |
|
43 | + $this->config = $config; |
|
44 | + $this->moduleManager = $moduleManager; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * Home site |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | $viewModel = new ViewModel(); |
108 | 108 | $viewModel->setTemplate('error/index') |
109 | - ->setVariable('message', 'An unexpected error had occured. Please try again later.'); |
|
109 | + ->setVariable('message', 'An unexpected error had occured. Please try again later.'); |
|
110 | 110 | return $viewModel; |
111 | 111 | } |
112 | 112 | } |