Completed
Branch dynamicfields (fd80d4)
by Derek Stephen
06:25
created
src/Field/FieldAbstract.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
     {
196 196
         $value = $this->getValue();
197 197
 
198
-        if ( (!$validator->isValid($value)) && $this->isRequired()) {
198
+        if ((!$validator->isValid($value)) && $this->isRequired()) {
199 199
             $this->errorMessages = array_merge($this->errorMessages, $validator->getMessages());
200 200
         }
201 201
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@
 block discarded – undo
349 349
     }
350 350
 
351 351
     /**
352
-     * @return bool
352
+     * @return integer
353 353
      */
354 354
     public function hasDynamicForms()
355 355
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 use Del\Form\Renderer\Field\FieldRendererInterface;
15 15
 use Del\Form\Renderer\Field\TextRender;
16 16
 use Del\Form\Traits\HasAttributesTrait;
17
-use Del\Form\Validator\Adapter\ValidatorAdapterZf;
18 17
 use Del\Form\Validator\NotEmpty;
19 18
 use Del\Form\Validator\ValidatorInterface;
20 19
 use Exception;
Please login to merge, or discard this patch.
src/AbstractForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
         while ($this->fieldCollection->valid()) {
286 286
             $current = $this->fieldCollection->current();
287 287
             $this->moveFileIfUploadField($current);
288
-            $this->fieldCollection->next() ;
288
+            $this->fieldCollection->next();
289 289
         }
290 290
     }
291 291
 
Please login to merge, or discard this patch.
src/Renderer/AbstractFormRenderer.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,6 +124,9 @@  discard block
 block discarded – undo
124 124
         return $form->getId() ?: $this->form->getAttribute('name');
125 125
     }
126 126
 
127
+    /**
128
+     * @param integer $dynamicTriggerValue
129
+     */
127 130
     private function processFields(FieldCollection $fields, $dynamicTriggerValue = null)
128 131
     {
129 132
         $count = $fields->count();
@@ -220,7 +223,7 @@  discard block
 block discarded – undo
220 223
     }
221 224
 
222 225
     /**
223
-     * @return DOMElement
226
+     * @return \DOMElement
224 227
      */
225 228
     protected function createLabelElement()
226 229
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
             $this->field = $fields->current();
134 134
             $finaliseDynamicBlock = ($x == $count) ? true : false;
135 135
             $this->renderField($dynamicTriggerValue, $finaliseDynamicBlock);
136
-            $x ++ ;
136
+            $x++;
137 137
             $fields->next();
138 138
         }
139 139
         $fields->rewind();
Please login to merge, or discard this patch.
src/Renderer/Field/SelectRender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $option->setAttribute('value', $value);
45 45
         $label = $this->createText($label);
46 46
         $option->appendChild($label);
47
-        if($field->getValue() == $option->getAttribute('value')) {
47
+        if ($field->getValue() == $option->getAttribute('value')) {
48 48
             $option->setAttribute('selected', 'selected');
49 49
         }
50 50
         return $option;
Please login to merge, or discard this patch.
src/Renderer/Field/CheckboxRender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $radio->setAttribute('value', $value);
104 104
         $text = $this->createText($labelText);
105 105
 
106
-        if(in_array($value, $field->getValue())) {
106
+        if (in_array($value, $field->getValue())) {
107 107
             $radio->setAttribute('checked', 'checked');
108 108
         }
109 109
 
Please login to merge, or discard this patch.
src/Renderer/Field/RadioRender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $radio->setAttribute('value', $value);
104 104
         $text = $this->createText($labelText);
105 105
 
106
-        if($field->getValue() == $radio->getAttribute('value')) {
106
+        if ($field->getValue() == $radio->getAttribute('value')) {
107 107
             $radio->setAttribute('checked', 'checked');
108 108
         }
109 109
 
Please login to merge, or discard this patch.