Completed
Push — master ( 6faa20...05d108 )
by Melech
04:48
created
src/Valkyrja/Filesystem/Providers/ServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $container->setClosure(
106 106
             Driver::class,
107
-            static function (array $config, string $adapter) use ($container): Driver {
107
+            static function(array $config, string $adapter) use ($container): Driver {
108 108
                 return new Driver(
109 109
                     $container->get(
110 110
                         $adapter,
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $container->setClosure(
130 130
             FlysystemAdapter::class,
131
-            static function (array $config) use ($container) {
131
+            static function(array $config) use ($container) {
132 132
                 return new FlysystemAdapter(
133 133
                     new Flysystem(
134 134
                         $container->get(
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $container->setClosure(
156 156
             FlysystemLocalAdapter::class,
157
-            static function (array $config) {
157
+            static function(array $config) {
158 158
                 return new FlysystemLocalAdapter(
159 159
                     $config['dir']
160 160
                 );
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $container->setClosure(
175 175
             FlysystemAwsS3Adapter::class,
176
-            static function (array $config) {
176
+            static function(array $config) {
177 177
                 $clientConfig = [
178 178
                     'credentials' => [
179 179
                         'key'    => $config['key'],
Please login to merge, or discard this patch.
src/Valkyrja/Filesystem/Enums/Visibility.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public const PUBLIC  = 'public';
29 29
     public const PRIVATE = 'private';
30 30
 
31
-    protected static ?array $VALUES = [
31
+    protected static ? array $VALUES = [
32 32
         self::PUBLIC  => self::PUBLIC,
33 33
         self::PRIVATE => self::PRIVATE,
34 34
     ];
Please login to merge, or discard this patch.
src/Valkyrja/Event/Annotation/Annotators/Annotator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     protected function setListenerProperties(Listener $listener): void
95 95
     {
96
-        if (! $listener->getClass()) {
96
+        if (!$listener->getClass()) {
97 97
             throw new InvalidArgumentException('Invalid class defined in listener.');
98 98
         }
99 99
 
Please login to merge, or discard this patch.
src/Valkyrja/Event/Dispatchers/Events.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function hasListeners(string $event): bool
176 176
     {
177
-        return $this->has($event) && ! empty(self::$events[$event]);
177
+        return $this->has($event) && !empty(self::$events[$event]);
178 178
     }
179 179
 
180 180
     /**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function add(string $event): void
188 188
     {
189
-        if (! $this->has($event)) {
189
+        if (!$this->has($event)) {
190 190
             self::$events[$event] = [];
191 191
         }
192 192
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         // The responses
231 231
         $responses = [];
232 232
 
233
-        if (! $this->has($event) || ! $this->hasListeners($event)) {
233
+        if (!$this->has($event) || !$this->hasListeners($event)) {
234 234
             return $responses;
235 235
         }
236 236
 
Please login to merge, or discard this patch.
src/Valkyrja/Path/Generators/PathGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         foreach ($data as $key => $datum) {
98 98
             // If the data isn't found in the params array it is not a valid
99 99
             // param
100
-            if (! isset($params[$key])) {
100
+            if (!isset($params[$key])) {
101 101
                 throw new InvalidArgumentException("Invalid route param '{$key}'");
102 102
             }
103 103
 
Please login to merge, or discard this patch.
src/Valkyrja/Path/Parsers/PathParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $segments = preg_split('~' . static::VARIABLE_REGEX . '(*SKIP)(*F) | \[~x', $path);
187 187
 
188
-        if (! is_array($segments)) {
188
+        if (!is_array($segments)) {
189 189
             throw new RuntimeException('Invalid path segments set in path: ' . $path);
190 190
         }
191 191
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         // Split the segment on that bracket
311 311
         // Iterate through the parts
312 312
         foreach (explode($deliminator, $segment) as $part) {
313
-            if (! $part) {
313
+            if (!$part) {
314 314
                 continue;
315 315
             }
316 316
 
Please login to merge, or discard this patch.
src/Valkyrja/Session/Adapters/CacheAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         // If the session failed to start
84
-        if (! session_start()) {
84
+        if (!session_start()) {
85 85
             // Throw a new exception
86 86
             throw new SessionStartFailure('The session failed to start!');
87 87
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function remove(string $id): bool
122 122
     {
123
-        if (! $this->has($id)) {
123
+        if (!$this->has($id)) {
124 124
             return false;
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/Valkyrja/ORM/Entities/EntityTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@
 block discarded – undo
262 262
         $type = $propertyTypes[$property] ?? null;
263 263
 
264 264
         // If there is no type specified just return the value
265
-        if (null === $type || ! is_string($value)) {
265
+        if (null === $type || !is_string($value)) {
266 266
             return $value;
267 267
         }
268 268
 
Please login to merge, or discard this patch.
src/Valkyrja/ORM/Persisters/Persister.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $entity->__set($entity::getDateModifiedField(), $date);
102 102
         }
103 103
 
104
-        if (! $defer) {
104
+        if (!$defer) {
105 105
             $this->persistEntity(Statement::INSERT, $entity, $entity->__storable());
106 106
 
107 107
             return;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             $entity->__set($entity::getDateModifiedField(), $this->getFormattedDate());
134 134
         }
135 135
 
136
-        if (! $defer) {
136
+        if (!$defer) {
137 137
             $this->persistEntity(Statement::UPDATE, $entity, $entity->__changed());
138 138
 
139 139
             return;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function delete(Entity $entity, bool $defer = true): void
163 163
     {
164
-        if (! $defer) {
164
+        if (!$defer) {
165 165
             $this->persistEntity(Statement::DELETE, $entity);
166 166
 
167 167
             return;
@@ -303,13 +303,13 @@  discard block
 block discarded – undo
303 303
         $query = $this->getQuery($queryBuilder, $type, $idField, $entity->{$idField}, $properties);
304 304
 
305 305
         // If the execute failed
306
-        if (! $query->execute()) {
306
+        if (!$query->execute()) {
307 307
             // Throw a fail exception
308 308
             throw new ExecuteException($query->getError());
309 309
         }
310 310
 
311 311
         if (
312
-            ! $entity->__isset($idField)
312
+            !$entity->__isset($idField)
313 313
             && $lastInsertId = $this->adapter->lastInsertId($entity::getTableName(), $idField)
314 314
         ) {
315 315
             $entity->__set($idField, $lastInsertId);
Please login to merge, or discard this patch.