Passed
Push — 5.x ( 2c5c24...6dc93b )
by Enjoys
11:29
created
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/Elements/Csrf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             Rules::CALLBACK,
33 33
             'CSRF Attack detected',
34 34
             [
35
-                function (string $key) {
35
+                function(string $key) {
36 36
                     /** @psalm-suppress  PossiblyNullArgument, MixedArgument */
37 37
                     if (password_verify($key, $this->getRequest()->getPostData(Form::_TOKEN_CSRF_, ''))) {
38 38
                         return true;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     private function getCsrfSecret(): string
68 68
     {
69
-        $secret = (string)$this->session->get('csrf_secret');
69
+        $secret = (string) $this->session->get('csrf_secret');
70 70
 
71 71
         if (empty($secret)) {
72 72
             $secret = $this->generateSecret();
Please login to merge, or discard this patch.