Passed
Push — master ( 34f20f...a12a6d )
by Enjoys
57s queued 12s
created
src/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @param array|Closure():array $data
103 103
      * @return $this
104 104
      */
105
-    public function setDefaults(array|Closure $data): Form
105
+    public function setDefaults(array | Closure $data): Form
106 106
     {
107 107
 
108 108
         if ($this->submitted === true) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     'POST' => $this->getRequest()->getPostData()->toArray(),
113 113
                     default => [],
114 114
                 },
115
-                function ($k) {
115
+                function($k) {
116 116
                     return !in_array($k, [self::_TOKEN_CSRF_, self::_TOKEN_SUBMIT_]);
117 117
                 },
118 118
                 ARRAY_FILTER_USE_KEY
Please login to merge, or discard this patch.
src/Rule/Email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,6 +52,6 @@
 block discarded – undo
52 52
 //            $value = idn_to_ascii($value);
53 53
 //        }
54 54
 
55
-        return (bool)filter_var($value, \FILTER_VALIDATE_EMAIL);
55
+        return (bool) filter_var($value, \FILTER_VALIDATE_EMAIL);
56 56
     }
57 57
 }
Please login to merge, or discard this patch.
src/Traits/Attributes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         return $this->attributes[$namespace];
26 26
     }
27 27
 
28
-    public function getAttribute(string $name, string $namespace = 'general'): AttributeInterface|null
28
+    public function getAttribute(string $name, string $namespace = 'general'): AttributeInterface | null
29 29
     {
30 30
         return $this->getAttributeCollection($namespace)->get($name);
31 31
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getAttributesString(string $namespace = 'general'): string
115 115
     {
116
-        $attributesStringed = (string)$this->getAttributeCollection($namespace);
116
+        $attributesStringed = (string) $this->getAttributeCollection($namespace);
117 117
 
118 118
         if (empty($attributesStringed)) {
119 119
             return '';
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @return $this
127 127
      * @noinspection PhpMissingReturnTypeInspection
128 128
      */
129
-    public function removeAttribute(string|AttributeInterface $attribute, string $namespace = 'general')
129
+    public function removeAttribute(string | AttributeInterface $attribute, string $namespace = 'general')
130 130
     {
131 131
         $this->getAttributeCollection($namespace)->remove($attribute);
132 132
         return $this;
Please login to merge, or discard this patch.
src/Elements/Textarea.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @return Textarea
48 48
      * @psalm-suppress RedundantConditionGivenDocblockType
49 49
      */
50
-    public function setRows(int|Closure $rows): Textarea
50
+    public function setRows(int | Closure $rows): Textarea
51 51
     {
52 52
         if ($rows instanceof Closure) {
53 53
             $rows = $rows();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @return Textarea
64 64
      * @psalm-suppress RedundantConditionGivenDocblockType
65 65
      */
66
-    public function setCols(int|Closure $cols): Textarea
66
+    public function setCols(int | Closure $cols): Textarea
67 67
     {
68 68
         if ($cols instanceof Closure) {
69 69
             $cols = $cols();
Please login to merge, or discard this patch.
src/Attribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
     /**
166 166
      * @throws InvalidArgumentException
167 167
      */
168
-    private function normalize(float|bool|int|string|null $value): ?string
168
+    private function normalize(float | bool | int | string | null $value): ?string
169 169
     {
170 170
         Assert::nullOrScalar($value);
171 171
         return ($value === null) ? null : \htmlspecialchars((string) $value, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
Please login to merge, or discard this patch.
src/Rule/Length.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
      * @return bool
64 64
      * @throws ExceptionRule
65 65
      */
66
-    private function check(string|int|array|false $value): bool
66
+    private function check(string | int | array | false $value): bool
67 67
     {
68 68
         if (is_array($value) || $value === false) {
69 69
             return true;
70 70
         }
71 71
 
72
-        $length = \mb_strlen(\trim((string)$value), 'UTF-8');
72
+        $length = \mb_strlen(\trim((string) $value), 'UTF-8');
73 73
         if (empty($value)) {
74 74
             return true;
75 75
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param int|string $threshold
98 98
      * @return bool
99 99
      */
100
-    private function equal(int $value, int|string $threshold): bool
100
+    private function equal(int $value, int | string $threshold): bool
101 101
     {
102 102
         return $value == $threshold;
103 103
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param int|string $threshold
109 109
      * @return bool
110 110
      */
111
-    private function notEqual(int $value, int|string $threshold): bool
111
+    private function notEqual(int $value, int | string $threshold): bool
112 112
     {
113 113
         return $value != $threshold;
114 114
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * @param int|string $threshold
120 120
      * @return bool
121 121
      */
122
-    private function greaterThan(int $value, int|string $threshold): bool
122
+    private function greaterThan(int $value, int | string $threshold): bool
123 123
     {
124 124
         return $value > $threshold;
125 125
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      * @param int|string $threshold
131 131
      * @return bool
132 132
      */
133
-    private function lessThan(int $value, int|string $threshold): bool
133
+    private function lessThan(int $value, int | string $threshold): bool
134 134
     {
135 135
         return $value < $threshold;
136 136
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @param int|string $threshold
142 142
      * @return bool
143 143
      */
144
-    private function greaterThanOrEqual(int $value, int|string $threshold): bool
144
+    private function greaterThanOrEqual(int $value, int | string $threshold): bool
145 145
     {
146 146
         return $value >= $threshold;
147 147
     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      * @param int|string $threshold
153 153
      * @return bool
154 154
      */
155
-    private function lessThanOrEqual(int $value, int|string $threshold): bool
155
+    private function lessThanOrEqual(int $value, int | string $threshold): bool
156 156
     {
157 157
         return $value <= $threshold;
158 158
     }
Please login to merge, or discard this patch.
src/Rule/Captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function __construct(?string $message = null)
25 25
     {
26
-        $this->message = $message ;
26
+        $this->message = $message;
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
src/Rule/Upload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         return true;
42 42
     }
43 43
 
44
-    private function check(UploadedFileInterface|false $value, Ruleable $element): bool
44
+    private function check(UploadedFileInterface | false $value, Ruleable $element): bool
45 45
     {
46 46
         /** @var array|scalar $options */
47 47
         foreach ($this->params as $rule => $options) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             /** @var class-string<UploadCheckInterface> $className */
58 58
             Assert::classExists($className, sprintf('Unknown Check Upload: [%s]', $className));
59 59
 
60
-            if ((new $className($value, $element, ...(array)$options))->check() === false) {
60
+            if ((new $className($value, $element, ...(array) $options))->check() === false) {
61 61
                 return false;
62 62
             }
63 63
         }
Please login to merge, or discard this patch.
src/Rule/UploadCheck/ExtensionsCheck.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
 
10 10
 final class ExtensionsCheck implements UploadCheckInterface
11 11
 {
12
-    private UploadedFileInterface|false $value;
12
+    private UploadedFileInterface | false $value;
13 13
     private Ruleable $element;
14 14
     private array $expectedExtensions;
15 15
     private ?string $message;
16 16
 
17
-    public function __construct(false|UploadedFileInterface $value, Ruleable $element, string $expectedExtensions, ?string $message = null)
17
+    public function __construct(false | UploadedFileInterface $value, Ruleable $element, string $expectedExtensions, ?string $message = null)
18 18
     {
19 19
         $this->value = $value;
20 20
         $this->element = $element;
Please login to merge, or discard this patch.