Completed
Push — 1.x ( 7c9630...91934d )
by Asao
01:28
created
src/Forms.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
     /**
92 92
      * @param Tag $form
93
-     * @return mixed
93
+     * @return Tag
94 94
      */
95 95
     private function setClass($form)
96 96
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
         $html = "";
278 278
         $args = func_get_args();
279 279
         foreach ($args as $element) {
280
-            $html .= "\n  " . $element;
280
+            $html .= "\n  ".$element;
281 281
         }
282 282
         $div = new Tag('div');
283 283
         $div->contents($html)->class('form-group');
Please login to merge, or discard this patch.
src/Tags/Composite.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-     * @param $name
55
+     * @param string $name
56 56
      * @return $this
57 57
      */
58 58
     private function name($name)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-     * @param string|Closure $format
67
+     * @param string $format
68 68
      * @return $this
69 69
      */
70 70
     public function format($format)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
     public function format($format)
71 71
     {
72 72
         if (is_string($format)) {
73
-            $format = function ($list) use ($format) {
73
+            $format = function($list) use ($format) {
74 74
                 $fields = [
75 75
                     $format,
76 76
                 ];
77 77
                 foreach ($list as $tag) {
78
-                    $fields[] = (string)$tag;
78
+                    $fields[] = (string) $tag;
79 79
                 }
80 80
                 return call_user_func_array('sprintf', $fields);
81 81
             };
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
     public function resetWidth($width = 'auto')
134 134
     {
135 135
         $width = $width ?: 'auto';
136
-        foreach($this->fields as $field) {
137
-            $field->style('width: ' . $width);
136
+        foreach ($this->fields as $field) {
137
+            $field->style('width: '.$width);
138 138
             if ($width === 'auto') {
139 139
                 $field->style('display: inline');
140 140
             }
Please login to merge, or discard this patch.
src/Data/Escape.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function getEscape()
60 60
     {
61
-        return function ($value) {
61
+        return function($value) {
62 62
             return $this->escape($value);
63 63
         };
64 64
     }
Please login to merge, or discard this patch.
src/Dates.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     public function __construct($options = [])
69 69
     {
70
-        foreach( ['years', 'months', 'days', 'hours', 'minutes', 'seconds'] as $field) {
70
+        foreach (['years', 'months', 'days', 'hours', 'minutes', 'seconds'] as $field) {
71 71
             if (isset($options[$field])) {
72 72
                 $this->$field = $options[$field];
73 73
             }
Please login to merge, or discard this patch.
src/Lists/AbstractList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     protected function getList()
87 87
     {
88 88
         $years = [];
89
-        $cmp   = function ($y) {
89
+        $cmp   = function($y) {
90 90
             if ($this->step > 0) {
91 91
                 return $y <= $this->end;
92 92
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             return false;
97 97
         };
98 98
         for ($y = $this->start; $cmp($y); $y += $this->step) {
99
-            $years[sprintf($this->formatValue,$y)] = $this->format($y);
99
+            $years[sprintf($this->formatValue, $y)] = $this->format($y);
100 100
         }
101 101
         return $years;
102 102
     }
Please login to merge, or discard this patch.
src/Lists/DatesComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
         }
88 88
         $format = $format ?: $info['format'];
89 89
         $fields = [];
90
-        foreach($info['fields'] as $key => $method) {
90
+        foreach ($info['fields'] as $key => $method) {
91 91
             $fields[$key] = $this->dates->$method($name);
92 92
         }
93 93
         return $this->dates->makeComposite($name, $fields, $format, $value);
Please login to merge, or discard this patch.
src/Lists/Lists.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public static function days($start = 1, $end = 31, $step = 1)
35 35
     {
36 36
         return GenericList::forge($start, $end, $step)->setFormat(
37
-            function ($day) {
37
+            function($day) {
38 38
                 return sprintf('%02d', $day);
39 39
             });
40 40
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public static function hours($start = 0, $end = 23, $step = 1)
49 49
     {
50 50
         return GenericList::forge($start, $end, $step)->setFormat(
51
-            function ($hour) {
51
+            function($hour) {
52 52
                 return sprintf('%02d', $hour);
53 53
             });
54 54
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public static function minutes($start = 0, $end = 59, $step = 5)
63 63
     {
64 64
         return GenericList::forge($start, $end, $step)->setFormat(
65
-            function ($min) {
65
+            function($min) {
66 66
                 return sprintf('%02d', $min);
67 67
             });
68 68
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public static function seconds($start = 0, $end = 59, $step = 15)
77 77
     {
78 78
         return GenericList::forge($start, $end, $step)->setFormat(
79
-            function ($sec) {
79
+            function($sec) {
80 80
                 return sprintf('%02d', $sec);
81 81
             });
82 82
     }
Please login to merge, or discard this patch.
src/Lists/MonthList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
             $start,
18 18
             $end,
19 19
             $step,
20
-            function ($month) {
20
+            function($month) {
21 21
                 return sprintf('%2d', $month);
22 22
             });
23 23
     }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function formatFullText()
39 39
     {
40
-        return function ($m) {
40
+        return function($m) {
41 41
             $list = [
42 42
                 'January',
43 43
                 'February',
Please login to merge, or discard this patch.
src/Tags/Select.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         parent::__construct('select');
37 37
         $this->list = $list;
38 38
         $this->setAttribute('name', $name);
39
-        $this->setAttribute('value', (array)$value);
39
+        $this->setAttribute('value', (array) $value);
40 40
     }
41 41
 
42 42
     /**
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
      */
74 74
     private function formSelect()
75 75
     {
76
-        $selectedValue = (array)$this->get('value');
76
+        $selectedValue = (array) $this->get('value');
77 77
         $this->setAttribute('value', false);
78 78
         $html = $this->formOptions($this->list, $selectedValue, $this->head);
79 79
         if ($html) {
80
-            $this->contents($html . "\n");
80
+            $this->contents($html."\n");
81 81
             $html = TagToString::format($this);
82 82
         }
83 83
         return $html;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $html .= "\n  <option value=\"\">{$head}</option>";
97 97
         }
98 98
         foreach ($list as $value => $label) {
99
-            if (in_array((string)$value, $selectedValue)) {
99
+            if (in_array((string) $value, $selectedValue)) {
100 100
                 $html .= "\n  <option value=\"{$value}\" selected>{$label}</option>";
101 101
             } else {
102 102
                 $html .= "\n  <option value=\"{$value}\">{$label}</option>";
Please login to merge, or discard this patch.