Completed
Push — master ( 768def...db0879 )
by Vitaliy
04:17
created
src/Element/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
      * @return string
15 15
      */
16 16
     public function render() {
17
-      $html = '<select ' . Html::renderAttributes($this->getAttributes()) . ' >';
17
+      $html = '<select '.Html::renderAttributes($this->getAttributes()).' >';
18 18
       $currentValue = $this->getValue();
19 19
 
20 20
       foreach ($this->options as $value => $text) {
21 21
         $html .= '<option'
22 22
           . ($currentValue == $value ? ' selected="1" ' : '')
23
-          . ' value="' . $value . '"'
23
+          . ' value="'.$value.'"'
24 24
           . '>'
25 25
           . $text
26 26
           . '</option>';
Please login to merge, or discard this patch.
src/Element/CheckboxList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
 
62 62
       foreach ($this->options as $value => $text) {
63 63
         $attributes['value'] = $value;
64
-        $attributes['name'] = $name . '[]';
64
+        $attributes['name'] = $name.'[]';
65 65
         if (in_array($value, $currentValues)) {
66 66
           $attributes['checked'] = 'checked';
67 67
         } else {
68 68
           unset($attributes['checked']);
69 69
         }
70 70
 
71
-        $html .= '<label>' . static::tag('input', $attributes) . $text . '</label>';
71
+        $html .= '<label>'.static::tag('input', $attributes).$text.'</label>';
72 72
       }
73 73
 
74 74
       return $html;
Please login to merge, or discard this patch.
src/Element/RadioList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
           unset($attributes['checked']);
28 28
         }
29 29
 
30
-        $html .= '<label>' . static::tag('input', $attributes) . $text . '</label>';
30
+        $html .= '<label>'.static::tag('input', $attributes).$text.'</label>';
31 31
       }
32 32
 
33 33
       return $html;
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     protected function addError($error) {
190 190
       if (!is_string($error)) {
191
-        throw new \InvalidArgumentException('Error should be a string, ' . gettype($error) . ' given.');
191
+        throw new \InvalidArgumentException('Error should be a string, '.gettype($error).' given.');
192 192
       }
193 193
       $this->validationResult = false;
194 194
       $this->errorList[] = $error;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function getElement($name) {
237 237
       if (empty($this->elements[$name])) {
238
-        throw new \InvalidArgumentException('Element with name "' . $name . '" not found');
238
+        throw new \InvalidArgumentException('Element with name "'.$name.'" not found');
239 239
       }
240 240
       return $this->elements[$name];
241 241
     }
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
      */
398 398
     public function addElement(Element\BaseElement $element) {
399 399
       if (isset($this->elements[$element->getName()])) {
400
-        throw new \Exception('Element with name ' . $element->getName() . ' is already added. Use setElement to overwrite it or change name');
400
+        throw new \Exception('Element with name '.$element->getName().' is already added. Use setElement to overwrite it or change name');
401 401
       }
402 402
 
403 403
       $this->cleanValidationFlag();
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
      * @return string
413 413
      */
414 414
     public function render() {
415
-      return $this->renderStart() . $this->renderElements() . $this->renderEnd();
415
+      return $this->renderStart().$this->renderElements().$this->renderEnd();
416 416
     }
417 417
 
418 418
 
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
         }
432 432
 
433 433
         $formHtml .=
434
-          '<dt>' . $element->getText() . '</dt>' .
435
-          '<dd>' . $element->render() . '</dd>';
434
+          '<dt>'.$element->getText().'</dt>'.
435
+          '<dd>'.$element->render().'</dd>';
436 436
       }
437 437
 
438 438
       $formHtml .= '</dl>';
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
       $method = $this->getMethod();
457 457
       $this->setAttribute('method', $method);
458 458
 
459
-      $html = '<form ' . Element\Html::renderAttributes($this->getAttributes()) . '>';
459
+      $html = '<form '.Element\Html::renderAttributes($this->getAttributes()).'>';
460 460
       $html .= $hidden->render();
461 461
 
462 462
       # render hidden element
Please login to merge, or discard this patch.
src/Element/TextArea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * @return string
16 16
      */
17 17
     public function render() {
18
-      return '<textarea ' . Html::renderAttributes($this->getAttributes()) . '>' . $this->getValue() . '</textarea>';
18
+      return '<textarea '.Html::renderAttributes($this->getAttributes()).'>'.$this->getValue().'</textarea>';
19 19
     }
20 20
 
21 21
 
Please login to merge, or discard this patch.
src/Element/Button.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         self::TYPE_SUBMIT,
60 60
       ])
61 61
       ) {
62
-        throw new \InvalidArgumentException('Invalid button type: ' . $type);
62
+        throw new \InvalidArgumentException('Invalid button type: '.$type);
63 63
       }
64 64
       $this->setAttribute('type', $type);
65 65
       return $this;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @return string
71 71
      */
72 72
     public function render() {
73
-      $html = '<button ' . Html::renderAttributes($this->getAttributes()) . ' >';
73
+      $html = '<button '.Html::renderAttributes($this->getAttributes()).' >';
74 74
       $html .= ($this->getText() ?: 'Button');
75 75
       $html .= '</button>';
76 76
 
Please login to merge, or discard this patch.
src/Element/Html.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
       $currentClass = $this->getAttribute('class');
41 41
 
42 42
       if (!empty($currentClass)) {
43
-        $className = $currentClass . ' ' . $className;
43
+        $className = $currentClass.' '.$className;
44 44
       }
45 45
 
46 46
       $this->setAttribute('class', $className);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public static function renderAttributes(array $attributes = []) {
57 57
       $attributesInline = '';
58 58
       foreach ($attributes as $name => $value) {
59
-        $attributesInline .= $name . '="' . addslashes($value) . '" ';
59
+        $attributesInline .= $name.'="'.addslashes($value).'" ';
60 60
       }
61 61
       return $attributesInline;
62 62
     }
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
      * @return string
71 71
      */
72 72
     public static function tag($tag, array $attributes = [], $content = null) {
73
-      $html = '<' . $tag . ' ' . static::renderAttributes($attributes);
73
+      $html = '<'.$tag.' '.static::renderAttributes($attributes);
74 74
 
75 75
       if ($content !== null) {
76
-        $html .= '>' . $content . '</' . $tag . '>';
76
+        $html .= '>'.$content.'</'.$tag.'>';
77 77
       } else {
78 78
         $html .= ' />';
79 79
       }
Please login to merge, or discard this patch.
src/FormData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function __construct($method, array $data = []) {
31 31
       if (!is_string($method)) {
32
-        throw new \InvalidArgumentException('Parameter "method" should be a string,  ' . gettype($method) . ' given.');
32
+        throw new \InvalidArgumentException('Parameter "method" should be a string,  '.gettype($method).' given.');
33 33
       }
34 34
       $method = strtoupper($method);
35 35
       if (!in_array($method, [self::METHOD_GET, self::METHOD_POST])) {
Please login to merge, or discard this patch.
src/Element/Checkbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      * @return string
98 98
      */
99 99
     public function render() {
100
-      return '<label>' . static::tag($this->tag, $this->attributes) . $this->label . '</label>';
100
+      return '<label>'.static::tag($this->tag, $this->attributes).$this->label.'</label>';
101 101
     }
102 102
 
103 103
 
Please login to merge, or discard this patch.