Passed
Push — master ( b6f457...706a45 )
by Caen
03:44 queued 17s
created
packages/publications/src/Publications.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
         $sortAscending ??= $publicationType->sortAscending;
45 45
         $sortField ??= $publicationType->sortField;
46 46
 
47
-        return $publications->sortBy(function (PublicationPage $page) use ($sortField): mixed {
47
+        return $publications->sortBy(function(PublicationPage $page) use ($sortField): mixed {
48 48
             return $page->matter($sortField);
49
-        }, descending: ! $sortAscending)->values()->toBase();
49
+        }, descending: !$sortAscending)->values()->toBase();
50 50
     }
51 51
 
52 52
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public static function getMediaForType(PublicationType $publicationType): Collection
56 56
     {
57
-        return collect(MediaFile::all())->filter(function (MediaFile $file) use ($publicationType): bool {
57
+        return collect(MediaFile::all())->filter(function(MediaFile $file) use ($publicationType): bool {
58 58
             return Str::startsWith($file->getPath(), Hyde::getMediaDirectory().'/'.$publicationType->getDirectory());
59 59
         })->keys()->toBase();
60 60
     }
Please login to merge, or discard this patch.
packages/publications/src/Commands/SeedPublicationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         if ($number >= 10000) {
45 45
             $this->warn('Warning: Generating a large number of publications may take a while. <fg=gray>Expected time: '.($number / 1000).' seconds.</>');
46
-            if (! $this->confirm('Are you sure you want to continue?')) {
46
+            if (!$this->confirm('Are you sure you want to continue?')) {
47 47
                 return parent::USER_EXIT;
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
packages/publications/src/Commands/Helpers/InputStreamHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public const TERMINATION_SEQUENCE = '<<<';
26 26
     public const END_OF_TRANSMISSION = "\x04";
27 27
 
28
-    private static ?array $mockedStreamBuffer = null;
28
+    private static ? array $mockedStreamBuffer = null;
29 29
 
30 30
     public static function call(): array
31 31
     {
Please login to merge, or discard this patch.
packages/publications/src/Commands/MakePublicationTypeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,8 +179,8 @@
 block discarded – undo
179 179
 
180 180
     protected function availableCanonicableFieldNames(): Collection
181 181
     {
182
-        return $this->fields->reject(function (PublicationFieldDefinition $field): bool {
183
-            return ! in_array($field->type, PublicationFieldTypes::canonicable());
182
+        return $this->fields->reject(function(PublicationFieldDefinition $field): bool {
183
+            return !in_array($field->type, PublicationFieldTypes::canonicable());
184 184
         })->pluck('name');
185 185
     }
186 186
 }
Please login to merge, or discard this patch.
packages/publications/src/Commands/ValidatePublicationsCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $this->timeStart = microtime(true);
67 67
 
68
-        if (! $this->option('json')) {
68
+        if (!$this->option('json')) {
69 69
             $this->title('Validating publications!');
70 70
         }
71 71
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $name = $this->argument('publicationType');
100 100
 
101 101
         if (filled($name)) {
102
-            if (! $publicationTypes->has($name)) {
102
+            if (!$publicationTypes->has($name)) {
103 103
                 throw new InvalidArgumentException("Publication type [$name] does not exist");
104 104
             }
105 105
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     protected function getMessageTypesInResult(array $results): array
183 183
     {
184
-        return array_map(function (string $result): string {
184
+        return array_map(function(string $result): string {
185 185
             return explode(':', $result)[0];
186 186
         }, array_values($results));
187 187
     }
Please login to merge, or discard this patch.
packages/publications/src/Commands/ValidatePublicationTypesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         $timeStart = microtime(true);
47 47
 
48
-        if (! $this->option('json')) {
48
+        if (!$this->option('json')) {
49 49
             $this->title('Validating publication schemas!');
50 50
         }
51 51
 
Please login to merge, or discard this patch.
packages/framework/src/Framework/Services/BuildTaskService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     /** @return array<class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask>|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */
113 113
     protected function findTasksInAppDirectory(): array
114 114
     {
115
-        return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string {
115
+        return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function(string $file): string {
116 116
             return static::pathToClassName($file);
117 117
         })->toArray();
118 118
     }
Please login to merge, or discard this patch.
packages/framework/src/Facades/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
     protected static function validated(mixed $value, string $type, string $key): mixed
59 59
     {
60
-        if (! call_user_func("is_$type", $value)) {
60
+        if (!call_user_func("is_$type", $value)) {
61 61
             throw new TypeError(sprintf('%s(): Config value %s must be of type %s, %s given', __METHOD__, $key, $type, gettype($value)));
62 62
         }
63 63
 
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@
 block discarded – undo
215 215
     {
216 216
         $storagePath = Hyde::mediaPath($this->source);
217 217
 
218
-        if (! file_exists($storagePath)) {
218
+        if (!file_exists($storagePath)) {
219 219
             throw new FileNotFoundException(customMessage: sprintf('Featured image [%s] not found.', Hyde::pathToRelative($storagePath)));
220 220
         }
221 221
 
Please login to merge, or discard this patch.