Passed
Push — 5.x ( 368a22...2c5c24 )
by Enjoys
02:40
created
src/Rules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      * @param array-key $key
50 50
      * @return mixed|null
51 51
      */
52
-    public function getParam(int|string $key): mixed
52
+    public function getParam(int | string $key): mixed
53 53
     {
54 54
         if (isset($this->params[$key])) {
55 55
             return $this->params[$key];
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/UploadCheck/MaxsizeCheck.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 {
15 15
 
16 16
 
17
-    private UploadedFileInterface|false $value;
17
+    private UploadedFileInterface | false $value;
18 18
     private Ruleable $element;
19
-    private int|string $thresholdSize;
19
+    private int | string $thresholdSize;
20 20
     private ?string $message;
21 21
 
22
-    public function __construct(false|UploadedFileInterface $value, Ruleable $element, int|string $thresholdSize, ?string $message = null)
22
+    public function __construct(false | UploadedFileInterface $value, Ruleable $element, int | string $thresholdSize, ?string $message = null)
23 23
     {
24 24
         $this->value = $value;
25 25
         $this->element = $element;
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
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
 
16
-    private UploadedFileInterface|false $value;
16
+    private UploadedFileInterface | false $value;
17 17
     private Ruleable $element;
18 18
     private array $expectedExtensions;
19 19
     private ?string $message;
20 20
 
21
-    public function __construct(false|UploadedFileInterface $value, Ruleable $element, string  $expectedExtensions, ?string $message = null)
21
+    public function __construct(false | UploadedFileInterface $value, Ruleable $element, string  $expectedExtensions, ?string $message = null)
22 22
     {
23 23
         $this->value = $value;
24 24
         $this->element = $element;
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
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         return true;
31 31
     }
32 32
 
33
-    private function check(UploadedFileInterface|false $value, Ruleable $element): bool
33
+    private function check(UploadedFileInterface | false $value, Ruleable $element): bool
34 34
     {
35 35
 
36 36
         foreach ($this->getParams() as $rule => $options) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             /** @var class-string<UploadCheckInterface> $className */
43 43
             $className = sprintf('\Enjoys\Forms\Rule\UploadCheck\%sCheck', ucfirst($rule));
44 44
             Assert::classExists($className, sprintf('Unknown Check Upload: [%s]', $className));
45
-            return (new $className($value, $element, ...(array)$options))->check();
45
+            return (new $className($value, $element, ...(array) $options))->check();
46 46
         }
47 47
         return true;
48 48
     }
Please login to merge, or discard this patch.