@@ -22,6 +22,9 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | trait EntityTrait |
| 24 | 24 | { |
| 25 | + /** |
|
| 26 | + * @param string $property |
|
| 27 | + */ |
|
| 25 | 28 | public function notEmpty($property, array $args=[]) |
| 26 | 29 | { |
| 27 | 30 | $method = "get$property"; |
@@ -20,16 +20,16 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | trait EntityTrait |
| 22 | 22 | { |
| 23 | - public function notEmpty($property, array $args=[]) |
|
| 23 | + public function notEmpty($property, array $args = []) |
|
| 24 | 24 | { |
| 25 | 25 | $method = "get$property"; |
| 26 | 26 | |
| 27 | 27 | if (!method_exists($this, $method)) { |
| 28 | - throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this) . "'"); |
|
| 28 | + throw new OutOfBoundsException("'$property' is not a valid property of '".get_class($this)."'"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $value = count($args) |
| 32 | - ? call_user_func_array([ $this, $method ], $args) |
|
| 32 | + ? call_user_func_array([$this, $method], $args) |
|
| 33 | 33 | : $this->$method(); |
| 34 | 34 | |
| 35 | 35 | if (null === $value) { // is_scalar does not consider 'null' to be scalar value. |
@@ -73,6 +73,9 @@ |
||
| 73 | 73 | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $layout |
|
| 78 | + */ |
|
| 76 | 79 | public function renderElement($element, $layout, $parameter) |
| 77 | 80 | { |
| 78 | 81 | $parameterPartial = $parameter; |
@@ -83,8 +83,8 @@ |
||
| 83 | 83 | if ($element instanceof ViewPartialProviderInterface) { |
| 84 | 84 | $parameterPartial = array_merge(array('element' => $element, 'layout' => $layout), $parameterPartial); |
| 85 | 85 | $content .= $this->getView()->partial( |
| 86 | - $element->getViewPartial(), |
|
| 87 | - $parameterPartial |
|
| 86 | + $element->getViewPartial(), |
|
| 87 | + $parameterPartial |
|
| 88 | 88 | ); |
| 89 | 89 | |
| 90 | 90 | } elseif ($element instanceof ViewHelperProviderInterface) { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if (isset($parameter['render_label']) && $parameter['render_label'] && ($label = $container->getLabel())) { |
| 67 | - $content .= '<div class="container-headline"><h3>' . $this->getView()->translate($label) . '</h3></div>'; |
|
| 67 | + $content .= '<div class="container-headline"><h3>'.$this->getView()->translate($label).'</h3></div>'; |
|
| 68 | 68 | } |
| 69 | 69 | foreach ($container as $element) { |
| 70 | 70 | $content .= $this->renderElement($element, $layout, $parameter); |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | } elseif ($element instanceof CoreSummaryForm) { |
| 100 | 100 | $content .= $this->getView()->summaryForm($element); |
| 101 | 101 | } elseif ($element instanceof Container) { |
| 102 | - $content.= $this->render($element, $layout, $parameter); |
|
| 102 | + $content .= $this->render($element, $layout, $parameter); |
|
| 103 | 103 | } else { |
| 104 | - $content.= $this->getView()->form($element, $layout, $parameter); |
|
| 104 | + $content .= $this->getView()->form($element, $layout, $parameter); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | return $content; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function trigger($event, $target = null) |
| 43 | 43 | { |
| 44 | 44 | if (empty($this->_template) || !is_string($this->_template)) { |
| 45 | - throw new \InvalidArgumentException('ContentCollector must have a template-name'); |
|
| 45 | + throw new \InvalidArgumentException('ContentCollector must have a template-name'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $responseCollection = $this->getController()->getEventManager()->trigger($event, $target); |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | $viewModel->setTemplate($this->_template); |
| 51 | 51 | foreach ($responseCollection as $i => $response) { |
| 52 | 52 | if (is_string($response)) { |
| 53 | - $template = $response; |
|
| 54 | - $response = new ViewModel(array('target' => $target)); |
|
| 55 | - $response->setTemplate($template); |
|
| 53 | + $template = $response; |
|
| 54 | + $response = new ViewModel(array('target' => $target)); |
|
| 55 | + $response->setTemplate($template); |
|
| 56 | 56 | } |
| 57 | 57 | $viewModel->addChild($response, $this->_captureTo . $i); |
| 58 | 58 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $response = new ViewModel(array('target' => $target)); |
| 55 | 55 | $response->setTemplate($template); |
| 56 | 56 | } |
| 57 | - $viewModel->addChild($response, $this->_captureTo . $i); |
|
| 57 | + $viewModel->addChild($response, $this->_captureTo.$i); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | return $viewModel; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * |
| 57 | 57 | * @var string |
| 58 | 58 | */ |
| 59 | - protected $options="Applications/Options"; |
|
| 59 | + protected $options = "Applications/Options"; |
|
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ->setIsDescriptionsEnabled(true) |
| 78 | 78 | ->setDescription( |
| 79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
| 80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
| 80 | + [round($size / (1024 * 1024)) > 0 ? round($size / (1024 * 1024)) : round($size / (1024 * 1024), 1)] |
|
| 81 | 81 | ) |
| 82 | 82 | ->setParam('return', 'file-uri') |
| 83 | 83 | ->setLabel(/*@translate*/ 'Attachments'); |
@@ -73,14 +73,14 @@ |
||
| 73 | 73 | $count = $options->getAttachmentsCount(); |
| 74 | 74 | |
| 75 | 75 | $form->setIsDisableCapable(false) |
| 76 | - ->setIsDisableElementsCapable(false) |
|
| 77 | - ->setIsDescriptionsEnabled(true) |
|
| 78 | - ->setDescription( |
|
| 76 | + ->setIsDisableElementsCapable(false) |
|
| 77 | + ->setIsDescriptionsEnabled(true) |
|
| 78 | + ->setDescription( |
|
| 79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
| 80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
| 81 | - ) |
|
| 82 | - ->setParam('return', 'file-uri') |
|
| 83 | - ->setLabel(/*@translate*/ 'Attachments'); |
|
| 80 | + [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
| 81 | + ) |
|
| 82 | + ->setParam('return', 'file-uri') |
|
| 83 | + ->setLabel(/*@translate*/ 'Attachments'); |
|
| 84 | 84 | |
| 85 | 85 | /** @var $file FileUpload*/ |
| 86 | 86 | $file = $form->get($this->fileName); |
@@ -23,35 +23,35 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * Job has been published |
| 25 | 25 | */ |
| 26 | - const RESPONSE_OK = 'ok'; |
|
| 26 | + const RESPONSE_OK = 'ok'; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Job has been published and has stopped all other publishing |
| 30 | 30 | */ |
| 31 | - const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
| 31 | + const RESPONSE_OKANDSTOP = 'ok and publishing terminated afterwards'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * publishing has been stopped |
| 35 | 35 | */ |
| 36 | - const RESPONSE_STOP = 'publishing terminated'; |
|
| 36 | + const RESPONSE_STOP = 'publishing terminated'; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * publishing has been denied, |
| 40 | 40 | * this is very likely when a job was not intended to be sended to a portal |
| 41 | 41 | */ |
| 42 | - const RESPONSE_DENIED = 'denied'; |
|
| 42 | + const RESPONSE_DENIED = 'denied'; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * a connection to the portal could not be established |
| 46 | 46 | * or the publishing of the Job has been rejected for other reasons |
| 47 | 47 | */ |
| 48 | - const RESPONSE_FAIL = 'fail'; |
|
| 48 | + const RESPONSE_FAIL = 'fail'; |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * This error has nothing to do with wrong inputs, |
| 52 | 52 | * something just has happend in the programm |
| 53 | 53 | */ |
| 54 | - const RESPONSE_ERROR = 'internal Error'; |
|
| 54 | + const RESPONSE_ERROR = 'internal Error'; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * nothing happens, but that's not a failure |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * nothing happens, and get used to it |
| 64 | 64 | */ |
| 65 | - const RESPONSE_DEPRECATED = 'deprecated'; |
|
| 65 | + const RESPONSE_DEPRECATED = 'deprecated'; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @var string |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * @param string $portal |
| 84 | 84 | * @param string $status |
| 85 | 85 | */ |
| 86 | - public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message='') |
|
| 86 | + public function __construct($portal = '', $status = self::RESPONSE_NOTIMPLEMENTED, $message = '') |
|
| 87 | 87 | { |
| 88 | 88 | $this->portal = $portal; |
| 89 | 89 | $this->status = $status; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $object = parent::hydrate($data, $object); |
| 44 | 44 | /* @var \Organizations\Entity\Template $template */ |
| 45 | - $template=$object->getOrganization()->getTemplate(); |
|
| 45 | + $template = $object->getOrganization()->getTemplate(); |
|
| 46 | 46 | if (isset($data['description-label-requirements'])) { |
| 47 | 47 | $template->setLabelRequirements($data['description-label-requirements']); |
| 48 | 48 | } |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | $this->add($fieldset); |
| 66 | 66 | |
| 67 | - $mode=$options->getMode(); |
|
| 67 | + $mode = $options->getMode(); |
|
| 68 | 68 | if (in_array($mode, [CaptchaOptions::RE_CAPTCHA, CaptchaOptions::IMAGE])) { |
| 69 | 69 | if ($mode == CaptchaOptions::IMAGE) { |
| 70 | 70 | $captcha = new Image($options->getImage()); |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | public function init() |
| 29 | 29 | { |
| 30 | 30 | $this->setName('data') |
| 31 | - ->setLabel('Group data') |
|
| 32 | - ->setUseAsBaseFieldset(true) |
|
| 33 | - ->setHydrator(new EntityHydrator()); |
|
| 31 | + ->setLabel('Group data') |
|
| 32 | + ->setUseAsBaseFieldset(true) |
|
| 33 | + ->setHydrator(new EntityHydrator()); |
|
| 34 | 34 | |
| 35 | 35 | $this->add( |
| 36 | 36 | array( |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | 'required' => true, |
| 70 | 70 | 'validators' => array( |
| 71 | 71 | array('name' => 'Auth/Form/UniqueGroupName', |
| 72 | - 'options' => array( |
|
| 72 | + 'options' => array( |
|
| 73 | 73 | 'allowName' => 'edit' == $this->getOption('mode') |
| 74 | 74 | ? $this->getObject()->getName() |
| 75 | 75 | : null |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function init() |
| 26 | 26 | { |
| 27 | 27 | $this->setIsDisableCapable(false) |
| 28 | - ->setIsDisableElementsCapable(false); |
|
| 28 | + ->setIsDisableElementsCapable(false); |
|
| 29 | 29 | |
| 30 | 30 | $this->setForms( |
| 31 | 31 | array( |