@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * |
| 62 | 62 | * @return self |
| 63 | 63 | */ |
| 64 | - public function addViewModel($name, $model, $priority=0) |
|
| 64 | + public function addViewModel($name, $model, $priority = 0) |
|
| 65 | 65 | { |
| 66 | 66 | $this->models->insert($name, $model, $priority); |
| 67 | 67 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | if (null === $buttonContent) { |
| 27 | 27 | throw new Exception\DomainException( |
| 28 | 28 | sprintf( |
| 29 | - '%s expects either button content as the second argument, ' . |
|
| 29 | + '%s expects either button content as the second argument, '. |
|
| 30 | 30 | 'or that the element provided has a label value; neither found', |
| 31 | 31 | __METHOD__ |
| 32 | 32 | ) |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $checkedBoole = ($value == 1 || $value == 'on'); |
| 47 | 47 | |
| 48 | 48 | |
| 49 | - $checkedClass = $checkedBoole?'active"':''; |
|
| 49 | + $checkedClass = $checkedBoole ? 'active"' : ''; |
|
| 50 | 50 | |
| 51 | 51 | $hiddenElement = ''; |
| 52 | 52 | if ($element->useHiddenElement()) { |
@@ -63,11 +63,11 @@ discard block |
||
| 63 | 63 | $element->setUseHiddenElement(false); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $buttonContent = $hiddenElement . PHP_EOL |
|
| 67 | - . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL |
|
| 68 | - . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL |
|
| 69 | - . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL |
|
| 70 | - . '</div>' . PHP_EOL; |
|
| 66 | + $buttonContent = $hiddenElement.PHP_EOL |
|
| 67 | + . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL |
|
| 68 | + . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL |
|
| 69 | + . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL |
|
| 70 | + . '</div>'.PHP_EOL; |
|
| 71 | 71 | |
| 72 | 72 | return $buttonContent; |
| 73 | 73 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | * @throws \Core\Entity\Exception\OutOfBoundsException if the property does not exists. |
| 73 | 73 | * @since 0.25 |
| 74 | 74 | */ |
| 75 | - public function notEmpty($property, array $args=[]); |
|
| 75 | + public function notEmpty($property, array $args = []); |
|
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * Checks, if this entity has a property. |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName; |
| 76 | 76 | |
| 77 | - if (is_array($inputLabel)){ |
|
| 78 | - $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
|
| 77 | + if (is_array($inputLabel)) { |
|
| 78 | + $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0; |
|
| 79 | 79 | $inputLabel = $inputLabel[0]; |
| 80 | - }else{ |
|
| 80 | + } else { |
|
| 81 | 81 | $priority = 0; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -89,19 +89,19 @@ discard block |
||
| 89 | 89 | ), |
| 90 | 90 | ); |
| 91 | 91 | if (is_bool($value)) { |
| 92 | - $input['type']= 'Checkbox'; |
|
| 92 | + $input['type'] = 'Checkbox'; |
|
| 93 | 93 | $input['attributes']['checked'] = $value; |
| 94 | 94 | } else { |
| 95 | 95 | $input['attributes']['value'] = $value; |
| 96 | 96 | } |
| 97 | - $this->add($input,['priority'=>$priority]); |
|
| 97 | + $this->add($input, ['priority'=>$priority]); |
|
| 98 | 98 | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | foreach ($children as $name => $child) { |
| 102 | 102 | $objectClass = ltrim(get_class($settings), '\\'); |
| 103 | 103 | $moduleName = substr($objectClass, 0, strpos($objectClass, '\\')); |
| 104 | - $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset'; |
|
| 104 | + $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset'; |
|
| 105 | 105 | |
| 106 | 106 | if ($this->formManager->has($fieldsetName)) { |
| 107 | 107 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function getConfig() |
| 30 | 30 | { |
| 31 | - return include __DIR__ . '/config/module.config.php'; |
|
| 31 | + return include __DIR__.'/config/module.config.php'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return array( |
| 43 | 43 | 'Zend\Loader\StandardAutoloader' => array( |
| 44 | 44 | 'namespaces' => array( |
| 45 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
| 45 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
| 46 | 46 | ), |
| 47 | 47 | ), |
| 48 | 48 | ); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | 'lang/jobs/view', |
| 49 | 49 | [], |
| 50 | 50 | [ |
| 51 | - 'query' => [ 'id' => $job->getId() ], |
|
| 51 | + 'query' => ['id' => $job->getId()], |
|
| 52 | 52 | 'force_canonical' => true |
| 53 | 53 | ] |
| 54 | 54 | ); |
@@ -224,7 +224,7 @@ |
||
| 224 | 224 | */ |
| 225 | 225 | public function setOneClickApply($oneClickApply) |
| 226 | 226 | { |
| 227 | - $this->oneClickApply = (bool)$oneClickApply; |
|
| 227 | + $this->oneClickApply = (bool) $oneClickApply; |
|
| 228 | 228 | |
| 229 | 229 | return $this; |
| 230 | 230 | } |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | protected $acl; |
| 46 | 46 | |
| 47 | - public function __construct(RepositoryService $repositoryService,AuthenticationService $auth, Acl $acl) { |
|
| 48 | - $this->repositoryService=$repositoryService; |
|
| 49 | - $this->auth=$auth; |
|
| 50 | - $this->acl=$acl; |
|
| 47 | + public function __construct(RepositoryService $repositoryService, AuthenticationService $auth, Acl $acl) { |
|
| 48 | + $this->repositoryService = $repositoryService; |
|
| 49 | + $this->auth = $auth; |
|
| 50 | + $this->acl = $acl; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function __invoke() |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | * @throws \Doctrine\ODM\MongoDB\LockException |
| 65 | 65 | * @throws NotFoundException |
| 66 | 66 | */ |
| 67 | - public function process(Params $params,$allowDraft = true) |
|
| 67 | + public function process(Params $params, $allowDraft = true) |
|
| 68 | 68 | { |
| 69 | - $repositories = $this->repositoryService; |
|
| 69 | + $repositories = $this->repositoryService; |
|
| 70 | 70 | /* @var \Organizations\Repository\Organization $organizationRepository */ |
| 71 | 71 | $organizationRepository = $this->repositoryService->get('Organizations/Organization'); |
| 72 | 72 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $user = $this->auth->getUser(); /* @var $user \Auth\Entity\UserInterface */ |
| 76 | 76 | |
| 77 | 77 | /* @var $organizationId string */ |
| 78 | - $organizationId = empty($idFromRoute)?$idFromSubForm:$idFromRoute; |
|
| 78 | + $organizationId = empty($idFromRoute) ? $idFromSubForm : $idFromRoute; |
|
| 79 | 79 | |
| 80 | 80 | $editOwnOrganization = '__my__' === $organizationId; |
| 81 | 81 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | return $organization; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - $organization = $organizationRepository->find($organizationId); |
|
| 113 | + $organization = $organizationRepository->find($organizationId); |
|
| 114 | 114 | if (!$organization) { |
| 115 | 115 | throw new NotFoundException($organizationId); |
| 116 | 116 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | try { |
| 125 | 125 | /* @var $handler \Organizations\Controller\Plugin\GetOrganizationHandler */ |
| 126 | 126 | $handler = $this->plugin('Organizations/GetOrganizationHandler'); |
| 127 | - $org = $handler->process($this->params(), true); |
|
| 127 | + $org = $handler->process($this->params(), true); |
|
| 128 | 128 | } catch (MissingParentOrganizationException $e) { |
| 129 | 129 | return $this->getErrorViewModel('no-parent'); |
| 130 | 130 | } catch (NotFoundException $e) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | ]; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $container = $this->getFormular($org); |
|
| 138 | + $container = $this->getFormular($org); |
|
| 139 | 139 | |
| 140 | 140 | if (isset($formIdentifier) && $request->isPost()) { |
| 141 | 141 | /* @var $form \Zend\Form\FormInterface */ |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $form = $container->get($formIdentifier); |
| 161 | 161 | $form->setData(array_merge($postData, $filesData)); |
| 162 | 162 | if (!isset($form)) { |
| 163 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
| 163 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
| 164 | 164 | } |
| 165 | 165 | $isValid = $form->isValid(); |
| 166 | 166 | |