@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * YAWIK |
|
| 4 | - * |
|
| 5 | - * @filesource |
|
| 6 | - * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
| 7 | - * @license MIT |
|
| 8 | - */ |
|
| 3 | + * YAWIK |
|
| 4 | + * |
|
| 5 | + * @filesource |
|
| 6 | + * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
| 7 | + * @license MIT |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | /** SettingsEntityResolverFactory.php */ |
| 11 | 11 | namespace Settings\Repository; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | if (empty($user->info->email)) { |
| 171 | 171 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
| 172 | 172 | } |
| 173 | - $userOrg = $user->getOrganization(); |
|
| 173 | + $userOrg = $user->getOrganization(); |
|
| 174 | 174 | if (!$userOrg->hasAssociation()) { |
| 175 | 175 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
| 176 | 176 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | $instanceForm = null; |
| 193 | 193 | $formErrorMessages = array(); |
| 194 | 194 | |
| 195 | - if (isset($formIdentifier) && $request->isPost()) { |
|
| 195 | + if (isset($formIdentifier) && $request->isPost()) { |
|
| 196 | 196 | // at this point the form get instantiated and immediately accumulated |
| 197 | 197 | $instanceForm = $form->getForm($formIdentifier); |
| 198 | 198 | if (!isset($instanceForm)) { |
@@ -250,13 +250,13 @@ discard block |
||
| 250 | 250 | $jobValid = false; |
| 251 | 251 | $errorMessage[] = $this->translator->translate('Accept the Terms'); |
| 252 | 252 | } |
| 253 | - $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]); |
|
| 253 | + $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]); |
|
| 254 | 254 | foreach ($result as $messages) { |
| 255 | 255 | if (!$messages) { |
| 256 | 256 | continue; |
| 257 | 257 | } |
| 258 | 258 | if (!is_array($messages)) { |
| 259 | - $messages = [ $messages ]; |
|
| 259 | + $messages = [$messages]; |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | $errorMessage = array_merge($errorMessage, $messages); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | } else { |
| 272 | 272 | $viewHelper = 'form'; |
| 273 | 273 | } |
| 274 | - $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 274 | + $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 275 | 275 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
| 276 | 276 | $viewModel = new JsonModel( |
| 277 | 277 | array( |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | } else { |
| 297 | - $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]); |
|
| 297 | + $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]); |
|
| 298 | 298 | // Job is deployed, some changes are now disabled |
| 299 | 299 | $form->enableAll(); |
| 300 | 300 | } |
@@ -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); |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | // array with differences between the last snapshot and the actual entity |
| 438 | 438 | // is remains Null if there is no snapshot |
| 439 | 439 | // it will be an empty array if the snapshot and the actual entity do not differ |
| 440 | - $diff = null; |
|
| 440 | + $diff = null; |
|
| 441 | 441 | // preliminary difference, contain all differences |
| 442 | 442 | $prelDiff = $this->entitySnapshot()->diff($jobEntity); |
| 443 | 443 | if (isset($prelDiff)) { |
@@ -475,21 +475,21 @@ discard block |
||
| 475 | 475 | 'lang/jobs/view', |
| 476 | 476 | array(), |
| 477 | 477 | array('query' => |
| 478 | - array( 'id' => $jobEntity->getId())) |
|
| 478 | + array('id' => $jobEntity->getId())) |
|
| 479 | 479 | ); |
| 480 | 480 | |
| 481 | 481 | $approvalLink = $this->url()->fromRoute( |
| 482 | 482 | 'lang/jobs/approval', |
| 483 | 483 | array('state' => 'approved'), |
| 484 | 484 | array('query' => |
| 485 | - array( 'id' => $jobEntity->getId())) |
|
| 485 | + array('id' => $jobEntity->getId())) |
|
| 486 | 486 | ); |
| 487 | 487 | |
| 488 | 488 | $declineLink = $this->url()->fromRoute( |
| 489 | 489 | 'lang/jobs/approval', |
| 490 | 490 | array('state' => 'declined'), |
| 491 | 491 | array('query' => |
| 492 | - array( 'id' => $jobEntity->getId())) |
|
| 492 | + array('id' => $jobEntity->getId())) |
|
| 493 | 493 | ); |
| 494 | 494 | |
| 495 | 495 | return array('job' => $jobEntity, |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | */ |
| 507 | 507 | public function deactivateAction() |
| 508 | 508 | { |
| 509 | - $user = $this->auth->getUser(); |
|
| 509 | + $user = $this->auth->getUser(); |
|
| 510 | 510 | |
| 511 | 511 | $jobEntity = $this->initializeJob()->get($this->params()); |
| 512 | 512 | |
@@ -20,18 +20,18 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | 'event_manager' => [ |
| 22 | 22 | |
| 23 | - 'Jobs/Events' => [ 'listeners' => [ |
|
| 23 | + 'Jobs/Events' => ['listeners' => [ |
|
| 24 | 24 | \Jobs\Listener\Events\JobEvent::EVENT_JOB_CREATED => [ |
| 25 | 25 | 'Orders/Listener/CreateJobOrder' => true, |
| 26 | 26 | ], |
| 27 | 27 | ]], |
| 28 | 28 | |
| 29 | - 'Jobs/JobContainer/Events' => [ 'listeners' => [ |
|
| 29 | + 'Jobs/JobContainer/Events' => ['listeners' => [ |
|
| 30 | 30 | \Core\Form\Event\FormEvent::EVENT_INIT => [ |
| 31 | 31 | 'Orders\Form\Listener\InjectInvoiceAddressInJobContainer', |
| 32 | 32 | ], |
| 33 | - 'ValidateJob' => [ '\Orders\Form\Listener\ValidateJobInvoiceAddress' ], |
|
| 34 | - 'DisableElements' => [ '\Orders\Form\Listener\DisableJobInvoiceAddress' ], |
|
| 33 | + 'ValidateJob' => ['\Orders\Form\Listener\ValidateJobInvoiceAddress'], |
|
| 34 | + 'DisableElements' => ['\Orders\Form\Listener\DisableJobInvoiceAddress'], |
|
| 35 | 35 | ]], |
| 36 | 36 | |
| 37 | 37 | 'Orders/Form/InvoiceAddress/Events' => [ |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | 'view_helper_config' => [ |
| 63 | 63 | 'headscript' => [ |
| 64 | 64 | 'lang/orders' => [ |
| 65 | - [ \Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND' ], |
|
| 65 | + [\Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND'], |
|
| 66 | 66 | 'js/bootstrap-dialog.min.js' |
| 67 | 67 | ], |
| 68 | 68 | ], |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | /* @var \Orders\Form\InvoiceAddress $invoiceAddress */ |
| 36 | 36 | $invoiceAddress = $event->getForm()->getForm('invoice.invoiceAddress'); |
| 37 | 37 | $invoiceAddress->setDisplayMode(SummaryFormInterface::DISPLAY_SUMMARY); |
| 38 | - foreach($invoiceAddress->getBaseFieldset() as $element) { |
|
| 38 | + foreach ($invoiceAddress->getBaseFieldset() as $element) { |
|
| 39 | 39 | $element->setAttribute('disabled', true); |
| 40 | 40 | } |
| 41 | 41 | } |