Completed
Branch develop (7585df)
by Carsten
11:01
created
module/Core/src/Core/Form/Container.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** Core forms */
11 11
 namespace Core\Form;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         }
289 289
         $formName .= $form['name'];
290 290
         $formInstance->setName($formName)
291
-                     ->setAttribute('action', '?form=' . $formName);
291
+                        ->setAttribute('action', '?form=' . $formName);
292 292
 
293 293
         //$testKey = $this->getActionFor($form['type']);
294 294
         
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $self = $this;
100 100
         $forms = array_map(
101
-            function ($key) use ($self) {
101
+            function($key) use ($self) {
102 102
                 return $self->getForm($key);
103 103
             },
104 104
             $this->activeForms
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         }
443 443
         $this->activeForms = array_filter(
444 444
             $this->activeForms,
445
-            function ($item) use ($key) {
445
+            function($item) use ($key) {
446 446
                 return !in_array($item, $key);
447 447
             }
448 448
         );
@@ -649,10 +649,10 @@  discard block
 block discarded – undo
649 649
         $actualKey = $this->getActiveFormActual();
650 650
         if (isset($actualKey)) {
651 651
             $forms = array_keys($this->forms);
652
-            $formsFlip =  array_flip($forms);
652
+            $formsFlip = array_flip($forms);
653 653
             $index = $formsFlip[$actualKey];
654 654
             if (0 < $index) {
655
-                $key = $forms[$index-1];
655
+                $key = $forms[$index - 1];
656 656
             }
657 657
         }
658 658
         return $key;
@@ -669,10 +669,10 @@  discard block
 block discarded – undo
669 669
         $actualKey = $this->getActiveFormActual();
670 670
         if (isset($actualKey)) {
671 671
             $forms = array_keys($this->forms);
672
-            $formsFlip =  array_flip($forms);
672
+            $formsFlip = array_flip($forms);
673 673
             $index = $formsFlip[$actualKey];
674 674
             if ($index < count($forms) - 1) {
675
-                $key = $forms[$index+1];
675
+                $key = $forms[$index + 1];
676 676
             }
677 677
         }
678 678
         return $key;
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
         }
692 692
 
693 693
         //$formInstance = $this->formElementManager->get($form['type'], $options);
694
-        $formName     = (($name = $this->getName()) ? $name . '.' : '') . $form['name'];
694
+        $formName = (($name = $this->getName()) ? $name . '.' : '') . $form['name'];
695 695
         $action = '?form=' . $formName;
696 696
 
697 697
         return $action;
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -569,6 +569,9 @@
 block discarded – undo
569 569
         return $return;
570 570
     }
571 571
 
572
+    /**
573
+     * @param \Zend\Stdlib\ParametersInterface $data
574
+     */
572 575
     public function setData($data)
573 576
     {
574 577
         $filteredData = array();
Please login to merge, or discard this patch.
module/Core/src/Core/Form/Element/FileUpload.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license       MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license       MIT
8
+     */
9 9
 
10 10
 /**  */
11 11
 namespace Core\Form\Element;
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
         if ($mimetypes) {
160 160
             $mimeTypeValidator = new MimeType();
161 161
             $mimeTypeValidator->setMagicFile(false)
162
-                              ->disableMagicFile(true)
163
-                              ->setMimeType($this->getAllowedTypes());
162
+                                ->disableMagicFile(true)
163
+                                ->setMimeType($this->getAllowedTypes());
164 164
 
165 165
             $validators[] = $mimeTypeValidator;
166 166
         }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/Element/Phone.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
     protected $validator;
15 15
 
16 16
     /**
17
-    * Get a validator if none has been set.
18
-    * https://github.com/posabsolute/jQuery-Validation-Engine/issues/265
19
-    * @return ValidatorInterface
20
-    */
17
+     * Get a validator if none has been set.
18
+     * https://github.com/posabsolute/jQuery-Validation-Engine/issues/265
19
+     * @return ValidatorInterface
20
+     */
21 21
     public function getValidator()
22 22
     {
23 23
         if (null === $this->validator) {
Please login to merge, or discard this patch.
module/Core/src/Core/Form/FileUploadFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     {
85 85
         /* @var $serviceLocator \Zend\Form\FormElementManager */
86 86
         $service = $serviceLocator->getServiceLocator();
87
-        $options=null;
87
+        $options = null;
88 88
         if ($this->options) {
89 89
             $options = $service->get($this->options);
90 90
         }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** SettingsEntityResolverFactory.php */
11 11
 namespace Settings\Repository;
Please login to merge, or discard this patch.
module/Core/src/Core/Form/RatingFieldset.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         $properties = $refl->getProperties();
50 50
         
51 51
         foreach ($properties as $property) {
52
-            $name  = $property->getName();
52
+            $name = $property->getName();
53 53
             if ('_' == $name{0}) {
54 54
                 continue;
55 55
             }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** SettingsEntityResolverFactory.php */
11 11
 namespace Settings\Repository;
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/Form.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** Core forms view helpers */
11 11
 namespace Core\Form\View\Helper;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
         $basepath   = $renderer->plugin('basepath');
72 72
         
73 73
         $headscript->appendFile($basepath('Core/js/core.spinnerbutton.js'))
74
-                   ->appendFile($basepath('js/select2.min.js'))
75
-                   ->appendFile($basepath('Core/js/core.forms.js'));
74
+                    ->appendFile($basepath('js/select2.min.js'))
75
+                    ->appendFile($basepath('Core/js/core.forms.js'));
76 76
 
77 77
         /* @noinspection PhpParamsInspection */
78 78
         $renderer->headLink()->appendStylesheet($basepath('css/select2.css'))
79
-                             ->appendStylesheet($basepath('css/select2-bootstrap.css'));
79
+                                ->appendStylesheet($basepath('css/select2-bootstrap.css'));
80 80
         
81 81
         if ($scripts = $form->getOption('headscript')) {
82 82
             if (!is_array($scripts)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             'id',
99 99
             preg_replace(
100 100
                 array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
101
-                array('-'              , '-'    , ''       ),
101
+                array('-', '-', ''),
102 102
                 $formId
103 103
             )
104 104
         );
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             if (!$element->hasAttribute('id')) {
120 120
                 $elementId = preg_replace(
121 121
                     array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
122
-                    array('-'             , '-',     ''),
122
+                    array('-', '-', ''),
123 123
                     $form->getName() . '-' . $element->getName()
124 124
                 );
125 125
                 $element->setAttribute('id', $elementId);
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         if (!$elementId) {
70 70
             $elementId = preg_replace(
71 71
                 array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
72
-                array('-'              , '-'    , ''       ),
72
+                array('-', '-', ''),
73 73
                 $element->getName()
74 74
             );
75 75
             $element->setAttribute('id', $elementId);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 if (!$elementOrFieldsetId) {
100 100
                     $elementOrFieldsetId = preg_replace(
101 101
                         array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'),
102
-                        array('-'              , '-'    , ''       ),
102
+                        array('-', '-', ''),
103 103
                         $elementOrFieldset->getName()
104 104
                     );
105 105
                     $elementOrFieldset->setAttribute('id', $elementOrFieldsetId);
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormContainer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
             } elseif ($element instanceof SummaryForm) {
84 84
                 $content .= $this->getView()->summaryForm($element);
85 85
             } elseif ($element instanceof Container) {
86
-                $content.= $this->render($element, $layout, $parameter);
86
+                $content .= $this->render($element, $layout, $parameter);
87 87
             } else {
88
-                $content.= $this->getView()->form($element, $layout, $parameter);
88
+                $content .= $this->getView()->form($element, $layout, $parameter);
89 89
             }
90 90
         }
91 91
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** SettingsEntityResolverFactory.php */
11 11
 namespace Settings\Repository;
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormEditor.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function render(ElementInterface $element)
24 24
     {
25
-        $name   = $element->getName();
25
+        $name = $element->getName();
26 26
         if (empty($name) && $name !== 0) {
27 27
             throw new \DomainException(
28 28
                 sprintf(
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
         }
104 104
         if (is_string($content)) {
105 105
             // content is should be in an ordinary textarea
106
-            $escapeHtml         = $this->getEscapeHtmlHelper();
106
+            $escapeHtml = $this->getEscapeHtmlHelper();
107 107
 
108
-            $class = array_key_exists('class', $attributes)?$attributes['class']:'';
109
-            $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme();
108
+            $class = array_key_exists('class', $attributes) ? $attributes['class'] : '';
109
+            $class .= (empty($class) ?: ' ') . ' tinymce_' . $this->getTheme();
110 110
             $attributes['class'] = $class;
111 111
             $placeHolder = '';
112 112
             $elementOptions = $element->getOptions();
113 113
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
114
-                $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . (empty($content)?'':'display:none;') . '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
114
+                $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . (empty($content) ? '' : 'display:none;') . '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
115 115
             }
116 116
             return
117 117
                 $placeHolder
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- * @author    [email protected]
9
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     * @author    [email protected]
9
+     */
10 10
 
11 11
 namespace Organizations\Form;
12 12
 
Please login to merge, or discard this patch.