@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function indexAction() |
57 | 57 | { |
58 | - if (!$this->options->getEnableRegistration()){ |
|
58 | + if (!$this->options->getEnableRegistration()) { |
|
59 | 59 | $this->notification()->info( /*@translate*/ 'Registration is disabled'); |
60 | 60 | return $this->redirect()->toRoute('lang'); |
61 | 61 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | /*@translate*/ 'Please fill form correctly' |
89 | 89 | ); |
90 | 90 | } |
91 | - }else{ |
|
91 | + } else { |
|
92 | 92 | /* @var $register \Zend\Form\Fieldset */ |
93 | 93 | $register = $this->form->get('register'); |
94 | 94 | $register->get('role')->setValue($this->params('role')); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $this->form->setAttribute('action', $this->url()->fromRoute('lang/register')); |
108 | 108 | |
109 | - $viewModel->setVariable('form' , $this->form ); |
|
109 | + $viewModel->setVariable('form', $this->form); |
|
110 | 110 | |
111 | 111 | return $viewModel; |
112 | 112 | } |
@@ -69,13 +69,13 @@ |
||
69 | 69 | if ('yawik' == $channelKey) { |
70 | 70 | $absoluteDiscount = 100; |
71 | 71 | } |
72 | - if ($channel->getPrice('base')>0) { |
|
72 | + if ($channel->getPrice('base') > 0) { |
|
73 | 73 | $sum += $channel->getPrice('base'); |
74 | 74 | $amount++; |
75 | 75 | } |
76 | 76 | } |
77 | - $discount=1-($amount-1)*13.5/100; |
|
78 | - if ($discount>0) $sum= round($sum * $discount,2); |
|
79 | - return $sum-$absoluteDiscount; |
|
77 | + $discount = 1 - ($amount - 1) * 13.5 / 100; |
|
78 | + if ($discount > 0) $sum = round($sum * $discount, 2); |
|
79 | + return $sum - $absoluteDiscount; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | \ No newline at end of file |
@@ -121,7 +121,7 @@ |
||
121 | 121 | 'attributes' => [ |
122 | 122 | 'data-placeholder' => /*@translate*/ 'please select', |
123 | 123 | 'data-allowclear' => 'false', |
124 | - 'data-searchbox' => -1, // hide the search box |
|
124 | + 'data-searchbox' => -1, // hide the search box |
|
125 | 125 | 'required' => true, // mark label as required |
126 | 126 | ], |
127 | 127 | ) |
@@ -55,7 +55,7 @@ |
||
55 | 55 | ), |
56 | 56 | 'attributes' => [ |
57 | 57 | 'value' => '10', // default distance |
58 | - 'data-searchbox' => -1, // hide the search box |
|
58 | + 'data-searchbox' => -1, // hide the search box |
|
59 | 59 | 'data-allowclear' => 'false', // allow to clear a selected value |
60 | 60 | 'data-placeholder' => /*@translate*/ 'Distance', |
61 | 61 | ] |
@@ -30,9 +30,9 @@ |
||
30 | 30 | $serviceLocator = $serviceLocator->getServiceLocator(); |
31 | 31 | $auth = $serviceLocator->get('AuthenticationService'); |
32 | 32 | /* @var RepositoryService $repositoryService */ |
33 | - $repositoryService = $serviceLocator->get('repositories'); |
|
33 | + $repositoryService = $serviceLocator->get('repositories'); |
|
34 | 34 | |
35 | - $translator = $serviceLocator->get('translator'); |
|
35 | + $translator = $serviceLocator->get('translator'); |
|
36 | 36 | return new ManageController($auth, $repositoryService, $translator); |
37 | 37 | } |
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if (empty($user->info->email)) { |
147 | 147 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
148 | 148 | } |
149 | - $userOrg = $user->getOrganization(); |
|
149 | + $userOrg = $user->getOrganization(); |
|
150 | 150 | if (!$userOrg->hasAssociation()) { |
151 | 151 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
152 | 152 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | $params = $this->params(); |
162 | 162 | $formIdentifier = $params->fromQuery('form'); |
163 | - $pageIdentifier = (int) $params->fromQuery('page', array_key_exists('page', $parameter)?$parameter['page']:0); |
|
163 | + $pageIdentifier = (int) $params->fromQuery('page', array_key_exists('page', $parameter) ? $parameter['page'] : 0); |
|
164 | 164 | |
165 | 165 | $jobEntity = $this->initializeJob()->get($this->params(), true); |
166 | 166 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $instanceForm = null; |
173 | 173 | $formErrorMessages = array(); |
174 | 174 | |
175 | - if (isset($formIdentifier) && $request->isPost()) { |
|
175 | + if (isset($formIdentifier) && $request->isPost()) { |
|
176 | 176 | // at this point the form get instantiated and immediately accumulated |
177 | 177 | $instanceForm = $form->getForm($formIdentifier); |
178 | 178 | if (!isset($instanceForm)) { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } else { |
238 | 238 | $viewHelper = 'form'; |
239 | 239 | } |
240 | - $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
240 | + $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
241 | 241 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
242 | 242 | $viewModel = new JsonModel( |
243 | 243 | array( |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | ); |
291 | 291 | } |
292 | 292 | if ($pageIdentifier < count($pageToForm) - 1) { |
293 | - $pageLinkNext = $this->url()->fromRoute( |
|
293 | + $pageLinkNext = $this->url()->fromRoute( |
|
294 | 294 | 'lang/jobs/manage', |
295 | 295 | [], |
296 | 296 | [ |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | } |
303 | 303 | $completionLink = $this->url()->fromRoute( |
304 | 304 | 'lang/jobs/completion', |
305 | - [ 'id' => $jobEntity->getId()] |
|
305 | + ['id' => $jobEntity->getId()] |
|
306 | 306 | ); |
307 | 307 | |
308 | 308 | $viewModel = $this->getViewModel($form); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | // array with differences between the last snapshot and the actual entity |
439 | 439 | // is remains Null if there is no snapshot |
440 | 440 | // it will be an empty array if the snapshot and the actual entity do not differ |
441 | - $diff = null; |
|
441 | + $diff = null; |
|
442 | 442 | // preliminary difference, contain all differences |
443 | 443 | $prelDiff = $this->entitySnapshot()->diff($jobEntity); |
444 | 444 | if (isset($prelDiff)) { |
@@ -474,21 +474,21 @@ discard block |
||
474 | 474 | 'lang/jobs/view', |
475 | 475 | array(), |
476 | 476 | array('query' => |
477 | - array( 'id' => $jobEntity->getId())) |
|
477 | + array('id' => $jobEntity->getId())) |
|
478 | 478 | ); |
479 | 479 | |
480 | 480 | $approvalLink = $this->url()->fromRoute( |
481 | 481 | 'lang/jobs/approval', |
482 | 482 | array('state' => 'approved'), |
483 | 483 | array('query' => |
484 | - array( 'id' => $jobEntity->getId())) |
|
484 | + array('id' => $jobEntity->getId())) |
|
485 | 485 | ); |
486 | 486 | |
487 | 487 | $declineLink = $this->url()->fromRoute( |
488 | 488 | 'lang/jobs/approval', |
489 | 489 | array('state' => 'declined'), |
490 | 490 | array('query' => |
491 | - array( 'id' => $jobEntity->getId())) |
|
491 | + array('id' => $jobEntity->getId())) |
|
492 | 492 | ); |
493 | 493 | |
494 | 494 | return array('job' => $jobEntity, |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | */ |
506 | 506 | public function deactivateAction() |
507 | 507 | { |
508 | - $user = $this->auth->getUser(); |
|
508 | + $user = $this->auth->getUser(); |
|
509 | 509 | |
510 | 510 | $jobEntity = $this->initializeJob()->get($this->params()); |
511 | 511 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | protected function editTemplateAction() |
81 | 81 | { |
82 | 82 | $id = $this->params('id'); |
83 | - $formIdentifier=$this->params()->fromQuery('form'); |
|
83 | + $formIdentifier = $this->params()->fromQuery('form'); |
|
84 | 84 | $job = $this->jobRepository->find($id); |
85 | 85 | |
86 | 86 | /** @var \Zend\Http\Request $request */ |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | */ |
39 | 39 | protected $acl; |
40 | 40 | |
41 | - public function __construct(RepositoryService $repositoryService,AuthenticationService $auth, Acl $acl) { |
|
42 | - $this->repositoryService=$repositoryService; |
|
43 | - $this->auth=$auth; |
|
44 | - $this->acl=$acl; |
|
41 | + public function __construct(RepositoryService $repositoryService, AuthenticationService $auth, Acl $acl) { |
|
42 | + $this->repositoryService = $repositoryService; |
|
43 | + $this->auth = $auth; |
|
44 | + $this->acl = $acl; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function __invoke() |
@@ -56,15 +56,15 @@ discard block |
||
56 | 56 | * @return \Jobs\Entity\Job|object |
57 | 57 | * @throws \Doctrine\ODM\MongoDB\LockException |
58 | 58 | */ |
59 | - public function get(Params $params,$allowDraft = false) |
|
59 | + public function get(Params $params, $allowDraft = false) |
|
60 | 60 | { |
61 | 61 | /* @var \Jobs\Repository\Job $jobRepository */ |
62 | - $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
62 | + $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
63 | 63 | $idFromRoute = $params('id', 0); |
64 | 64 | $idFromQuery = $params->fromQuery('id', 0); |
65 | 65 | $idFromSubForm = $params->fromPost('job', 0); |
66 | 66 | |
67 | - $id = empty($idFromRoute)? (empty($idFromQuery)?$idFromSubForm:$idFromQuery) : $idFromRoute; |
|
67 | + $id = empty($idFromRoute) ? (empty($idFromQuery) ? $idFromSubForm : $idFromQuery) : $idFromRoute; |
|
68 | 68 | |
69 | 69 | if (empty($id) && $allowDraft) { |
70 | 70 | $this->acl->__invoke('Jobs/Manage', 'new'); |
@@ -127,12 +127,12 @@ |
||
127 | 127 | try { |
128 | 128 | /* @var $handler \Organizations\Controller\Plugin\GetOrganizationHandler */ |
129 | 129 | $handler = $this->plugin('Organizations/GetOrganizationHandler'); |
130 | - $org = $handler->process($this->params(), true); |
|
130 | + $org = $handler->process($this->params(), true); |
|
131 | 131 | } catch (\RuntimeException $e) { |
132 | 132 | return $this->getErrorViewModel('no-parent'); |
133 | 133 | } |
134 | 134 | |
135 | - $container = $this->getFormular($org); |
|
135 | + $container = $this->getFormular($org); |
|
136 | 136 | |
137 | 137 | if (isset($formIdentifier) && $request->isPost()) { |
138 | 138 | /* @var $form \Zend\Form\FormInterface */ |