Passed
Push — master ( b80838...36f972 )
by Petr
06:32 queued 03:56
created
php-tests/ControlTests/BoxTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $input->set('myown', ['bar' => 'yep'], 'choose me', ['foo' => 'first', 'bar' => 'second', 'baz' => 'third', 'edd' => $extra]);
31 31
 
32 32
         $this->assertEquals(
33
-  '<input type="checkbox" value="first" id="myown_foo" name="foo" /> <label for="myown_foo">first</label>' . PHP_EOL
33
+    '<input type="checkbox" value="first" id="myown_foo" name="foo" /> <label for="myown_foo">first</label>' . PHP_EOL
34 34
 . '<input type="checkbox" value="second" id="myown_bar" checked="checked" name="bar" /> <label for="myown_bar">second</label>' . PHP_EOL
35 35
 . '<input type="checkbox" value="third" id="myown_baz" name="baz" /> <label for="myown_baz">third</label>' . PHP_EOL
36 36
 . '<input type="checkbox" value="1" id="myown_edd" name="edd" /> <label for="myown_edd">fourth</label>' . PHP_EOL, $input->renderInput());
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $this->assertEmpty($values['bar']);
40 40
         $this->assertEquals('third', $values['baz']);
41 41
         $this->assertEquals(
42
-  '<input type="checkbox" value="first" id="myown_foo" name="foo" /> <label for="myown_foo">first</label>' . PHP_EOL
42
+    '<input type="checkbox" value="first" id="myown_foo" name="foo" /> <label for="myown_foo">first</label>' . PHP_EOL
43 43
 . '<input type="checkbox" value="second" id="myown_bar" name="bar" /> <label for="myown_bar">second</label>' . PHP_EOL
44 44
 . '<input type="checkbox" value="third" id="myown_baz" name="baz" checked="checked" /> <label for="myown_baz">third</label>' . PHP_EOL
45 45
 . '<input type="checkbox" value="1" id="myown_edd" name="edd" /> <label for="myown_edd">fourth</label>' . PHP_EOL, $input->renderInput());
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
         $input->set('myown', 'bar', 'choose me', ['foo' => 'first', 'bar' => 'second', 'baz' => 'third', 'edd' => $extra]);
67 67
 
68 68
         $this->assertEquals(
69
-  '<input type="radio" value="foo" id="myown_foo" name="myown" /> <label for="myown_foo">first</label>' . PHP_EOL
69
+    '<input type="radio" value="foo" id="myown_foo" name="myown" /> <label for="myown_foo">first</label>' . PHP_EOL
70 70
 . '<input type="radio" value="bar" checked="checked" id="myown_bar" name="myown" /> <label for="myown_bar">second</label>' . PHP_EOL
71 71
 . '<input type="radio" value="baz" id="myown_baz" name="myown" /> <label for="myown_baz">third</label>' . PHP_EOL
72 72
 . '<input type="radio" value="1" id="myown_1" name="myown" /> <label for="myown_1">fourth</label>', $input->renderInput());
73 73
         $input->setValue('baz');
74 74
         $this->assertEquals('baz', $input->getValue());
75 75
         $this->assertEquals(
76
-  '<input type="radio" value="foo" id="myown_foo" name="myown" /> <label for="myown_foo">first</label>' . PHP_EOL
76
+    '<input type="radio" value="foo" id="myown_foo" name="myown" /> <label for="myown_foo">first</label>' . PHP_EOL
77 77
 . '<input type="radio" value="bar" id="myown_bar" name="myown" /> <label for="myown_bar">second</label>' . PHP_EOL
78 78
 . '<input type="radio" value="baz" id="myown_baz" name="myown" checked="checked" /> <label for="myown_baz">third</label>' . PHP_EOL
79 79
 . '<input type="radio" value="1" id="myown_1" name="myown" /> <label for="myown_1">fourth</label>', $input->renderInput());
Please login to merge, or discard this patch.
php-tests/ControlTests/DateTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $input->resetUniq();
28 28
         $input->set('myown', 'original', 'not to look');
29 29
         $this->assertEquals(
30
-  ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> '. PHP_EOL
30
+    ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> '. PHP_EOL
31 31
 . ' <input type="text" value="" class="datepicker" id="myown_1" name="myown[]" /> ', $input->renderInput());
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $input->resetUniq();
28 28
         $input->set('myown', 'original', 'not to look');
29 29
         $this->assertEquals(
30
-  ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> '. PHP_EOL
30
+  ' <input type="text" value="" class="datepicker" id="myown_0" name="myown[]" /> ' . PHP_EOL
31 31
 . ' <input type="text" value="" class="datepicker" id="myown_1" name="myown[]" /> ', $input->renderInput());
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
php-tests/ControlTests/SelectTest.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
 
34 34
         $this->assertEmpty($input->renderErrors([]));
35 35
         $this->assertEquals(
36
-  '<optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
36
+    '<optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
37 37
 . ' <option value="bar">second</option> ' . PHP_EOL
38 38
 . ' <option value="baz">third</option> ' . PHP_EOL
39 39
 . ' <option value="1">fourth</option> </optgroup>', $input->renderInput());
40 40
         $input->setValue('baz');
41 41
         $this->assertEquals('baz', $input->getValue());
42 42
         $this->assertEquals(
43
-  '<optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
43
+    '<optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
44 44
 . ' <option value="bar">second</option> ' . PHP_EOL
45 45
 . ' <option value="baz" selected="selected">third</option> ' . PHP_EOL
46 46
 . ' <option value="1">fourth</option> </optgroup>', $input->renderInput());
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $this->assertEquals('', $input->getValue());
73 73
         $this->assertEquals(
74
-  '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
74
+    '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
75 75
 . ' <option value="bar">second</option> ' . PHP_EOL
76 76
 . ' <option value="baz">third</option> </optgroup> ' . PHP_EOL
77 77
 . ' <optgroup label="choose another"> <option value="fss">fifth</option> ' . PHP_EOL
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $input->setValue('dfg');
82 82
         $this->assertEquals('dfg', $input->getValue());
83 83
         $this->assertEquals(
84
-  '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
84
+    '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
85 85
 . ' <option value="bar">second</option> ' . PHP_EOL
86 86
 . ' <option value="baz">third</option> </optgroup> ' . PHP_EOL
87 87
 . ' <optgroup label="choose another"> <option value="fss">fifth</option> ' . PHP_EOL
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $input->setValue('1');
92 92
         $this->assertEquals('1', $input->getValue());
93 93
         $this->assertEquals(
94
-  '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
94
+    '<select  id="myown" name="myown"> <optgroup label="choose me"> <option value="foo">first</option> ' . PHP_EOL
95 95
 . ' <option value="bar">second</option> ' . PHP_EOL
96 96
 . ' <option value="baz">third</option> </optgroup> ' . PHP_EOL
97 97
 . ' <optgroup label="choose another"> <option value="fss">fifth</option> ' . PHP_EOL
Please login to merge, or discard this patch.
php-tests/ControlTests/FilesTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $input = new Controls\Files();
26 26
         $input->set('myown', ['one', 'two'], 'Upload files');
27 27
         $this->assertEquals(
28
-  '<label for="myown_0">one</label> <input type="file" id="myown_0" name="myown[]" /> ' . PHP_EOL
28
+    '<label for="myown_0">one</label> <input type="file" id="myown_0" name="myown[]" /> ' . PHP_EOL
29 29
 . '<label for="myown_1">two</label> <input type="file" id="myown_1" name="myown[]" /> ' . PHP_EOL, $input->renderInput());
30 30
     }
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $input = new Controls\Files();
35 35
         $input->set('myown', ['foo' => 'one', 'bar' => 'two'], 'Upload files');
36 36
         $this->assertEquals(
37
-  '<label for="myown_0">one</label> <input type="file" id="myown_0" name="myown[foo]" /> ' . PHP_EOL
37
+    '<label for="myown_0">one</label> <input type="file" id="myown_0" name="myown[foo]" /> ' . PHP_EOL
38 38
 . '<label for="myown_1">two</label> <input type="file" id="myown_1" name="myown[bar]" /> ' . PHP_EOL, $input->renderInput());
39 39
     }
40 40
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         $this->assertNotEmpty($input->getValues());
52 52
         $this->assertEquals(
53
-  '<label for="download_0">one</label> <input type="file" id="download_0" name="download[file1]" /> ' . PHP_EOL
53
+    '<label for="download_0">one</label> <input type="file" id="download_0" name="download[file1]" /> ' . PHP_EOL
54 54
 . '<label for="download_1">two</label> <input type="file" id="download_1" name="download[file2]" /> ' . PHP_EOL, $input->renderInput());
55 55
     }
56 56
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $input->setValues(iterator_to_array($adapter));
66 66
 
67 67
         $this->assertEquals(
68
-  '<label for="numbered_0">one</label> <input type="file" id="numbered_0" name="numbered[]" /> ' . PHP_EOL
68
+    '<label for="numbered_0">one</label> <input type="file" id="numbered_0" name="numbered[]" /> ' . PHP_EOL
69 69
 . '<label for="numbered_1">two</label> <input type="file" id="numbered_1" name="numbered[]" /> ' . PHP_EOL, $input->renderInput());
70 70
     }
71 71
 
Please login to merge, or discard this patch.
php-tests/CommonTestClass.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function load(string $key)
41 41
     {
42
-        return isset($this->content[$key]) ? $this->content[$key] : null ;
42
+        return isset($this->content[$key]) ? $this->content[$key] : null;
43 43
     }
44 44
 
45 45
     public function save(string $key, $data, ?int $timeout = null): bool
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     public function current()
95 95
     {
96
-        return $this->valid() ? $this->offsetGet($this->key) : null ;
96
+        return $this->valid() ? $this->offsetGet($this->key) : null;
97 97
     }
98 98
 
99 99
     public function next()
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
     protected function fileDataset(): array
185 185
     {
186 186
         return [
187
-            'files' => [ // simple upload
187
+            'files' => [// simple upload
188 188
                 'name' => 'facepalm.jpg',
189 189
                 'type' => 'image/jpeg',
190 190
                 'tmp_name' => '/tmp/php3zU3t5',
191 191
                 'error' => UPLOAD_ERR_OK,
192 192
                 'size' => 591387,
193 193
             ],
194
-            'download' => [ // multiple upload
194
+            'download' => [// multiple upload
195 195
                 'name' => [
196 196
                     'file1' => 'MyFile.txt',
197 197
                     'file2' => 'MyFile.jpg',
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                     'file2' => 3075,
214 214
                 ],
215 215
             ],
216
-            'numbered' => [ // multiple upload
216
+            'numbered' => [// multiple upload
217 217
                 'name' => [
218 218
                     0 => 'MyFile.txt',
219 219
                     1 => 'MyFile.jpg',
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 
51 51
     public function remove(string $key): bool
52 52
     {
53
-        if (isset($this->content[$key])) unset($this->content[$key]);
53
+        if (isset($this->content[$key])) {
54
+            unset($this->content[$key]);
55
+        }
54 56
         return true;
55 57
     }
56 58
 
Please login to merge, or discard this patch.
php-src/Adapters/AAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     #[\ReturnTypeWillChange]
40 40
     public function current()
41 41
     {
42
-        return $this->valid() ? $this->offsetGet($this->key) : null ;
42
+        return $this->valid() ? $this->offsetGet($this->key) : null;
43 43
     }
44 44
 
45 45
     public function next(): void
Please login to merge, or discard this patch.
php-src/Interfaces/ICsrf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @param ArrayAccess $cookie
18 18
      * @param int         $expire
19 19
      */
20
-    public function init(ArrayAccess &$cookie, int $expire = 3600): void;
20
+    public function init(ArrayAccess & $cookie, int $expire = 3600): void;
21 21
 
22 22
     /**
23 23
      * Remove known token
Please login to merge, or discard this patch.
php-src/Controls/Submit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function getValue()
28 28
     {
29
-        return $this->submitted ? $this->originalValue : '' ;
29
+        return $this->submitted ? $this->originalValue : '';
30 30
     }
31 31
 
32 32
     public function setTitle(string $title): void
Please login to merge, or discard this patch.
php-src/Controls/Button.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         if (empty($title) && !empty($alias)) {
20 20
             $title = $alias;
21 21
         }
22
-        $title = empty($title) ? strval($this->originalValue) : $title ;
22
+        $title = empty($title) ? strval($this->originalValue) : $title;
23 23
         if (empty($alias)) {
24 24
             $alias = $title;
25 25
         }
Please login to merge, or discard this patch.