Passed
Branch kernel-refactor-experiment (803797)
by Caen
03:29
created
packages/framework/src/Models/DocumentationSidebar.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function generate(): self
13 13
     {
14
-        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function (Route $route) {
14
+        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function(Route $route) {
15 15
             $this->items->push(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)));
16 16
         });
17 17
 
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function hasGroups(): bool
22 22
     {
23
-        return $this->items->map(function (NavItem $item) {
23
+        return $this->items->map(function(NavItem $item) {
24 24
             return $item->getGroup() !== null;
25 25
         })->contains(true);
26 26
     }
27 27
 
28 28
     public function getGroups(): array
29 29
     {
30
-        return $this->items->map(function (NavItem $item) {
30
+        return $this->items->map(function(NavItem $item) {
31 31
             return $item->getGroup();
32 32
         })->unique()->toArray();
33 33
     }
34 34
 
35 35
     public function getItemsInGroup(?string $group): Collection
36 36
     {
37
-        return $this->items->filter(function ($item) use ($group) {
37
+        return $this->items->filter(function($item) use ($group) {
38 38
             return $item->getGroup() === $group || $item->getGroup() === Str::slug($group);
39 39
         })->sortBy('priority')->values();
40 40
     }
41 41
 
42 42
     protected function filterHiddenItems(): Collection
43 43
     {
44
-        return $this->items->reject(function (NavItem $item) {
44
+        return $this->items->reject(function(NavItem $item) {
45 45
             return $item->route->getSourceModel()->matter('hidden', false) || ($item->route->getRouteKey() === 'docs/index');
46 46
         })->values();
47 47
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $orderIndexArray = config('docs.sidebar_order', []);
57 57
 
58
-        if (! in_array($slug, $orderIndexArray)) {
58
+        if (!in_array($slug, $orderIndexArray)) {
59 59
             return 500;
60 60
         }
61 61
 
Please login to merge, or discard this patch.
packages/framework/src/Services/DiscoveryService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function getSourceFileListForModel(string $model): array|false
134 134
     {
135
-        if (! class_exists($model) || ! is_subclass_of($model, AbstractPage::class)) {
135
+        if (!class_exists($model) || !is_subclass_of($model, AbstractPage::class)) {
136 136
             return false;
137 137
         }
138 138
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         $files = [];
142 142
         foreach (glob(Hyde::path($model::qualifyBasename('{*,**/*}')), GLOB_BRACE) as $filepath) {
143
-            if (! str_starts_with(basename($filepath), '_')) {
143
+            if (!str_starts_with(basename($filepath), '_')) {
144 144
                 $files[] = self::formatSlugForModel($model, $filepath);
145 145
             }
146 146
         }
Please login to merge, or discard this patch.
packages/framework/src/Commands/HydeBuildSitemapCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $actionTime = microtime(true);
38 38
 
39
-        if (! $this->runPreflightCheck()) {
39
+        if (!$this->runPreflightCheck()) {
40 40
             return 1;
41 41
         }
42 42
 
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
 
50 50
     protected function runPreflightCheck(): bool
51 51
     {
52
-        if (! SitemapService::canGenerateSitemap()) {
52
+        if (!SitemapService::canGenerateSitemap()) {
53 53
             $this->error('Cannot generate sitemap.xml, please check your configuration.');
54 54
 
55
-            if (! Hyde::hasSiteUrl()) {
55
+            if (!Hyde::hasSiteUrl()) {
56 56
                 $this->warn('Hint: You don\'t have a site URL configured. Check config/hyde.php');
57 57
             }
58 58
             if (config('site.generate_sitemap', true) !== true) {
59 59
                 $this->warn('Hint: You have disabled sitemap generation in config/hyde.php');
60 60
                 $this->line(' > You can enable sitemap generation by setting <info>`site.generate_sitemap`</> to <info>`true`</>');
61 61
             }
62
-            if (! extension_loaded('simplexml') || config('testing.mock_disabled_extensions', false) === true) {
62
+            if (!extension_loaded('simplexml') || config('testing.mock_disabled_extensions', false) === true) {
63 63
                 $this->warn('Hint: You don\'t have the <info>`simplexml`</> extension installed. Check your PHP installation.');
64 64
             }
65 65
 
Please login to merge, or discard this patch.
packages/framework/src/Services/RssFeedService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
     protected static function xmlEscape(string $string): string
101 101
     {
102
-        return htmlspecialchars($string, ENT_XML1 | ENT_COMPAT, 'UTF-8');
102
+        return htmlspecialchars($string, ENT_XML1|ENT_COMPAT, 'UTF-8');
103 103
     }
104 104
 
105 105
     public static function getDescription(): string
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Filesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,11 +232,11 @@
 block discarded – undo
232 232
      */
233 233
     public function copy(string $from, string $to, bool $force = false): bool|int
234 234
     {
235
-        if (! file_exists($from)) {
235
+        if (!file_exists($from)) {
236 236
             return 404;
237 237
         }
238 238
 
239
-        if (file_exists($to) && ! $force) {
239
+        if (file_exists($to) && !$force) {
240 240
             return 409;
241 241
         }
242 242
 
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Hyperlinks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
      */
178 178
     public function hasSiteUrl(): bool
179 179
     {
180
-        return ! blank(config('site.url'));
180
+        return !blank(config('site.url'));
181 181
     }
182 182
 
183 183
     /**
Please login to merge, or discard this patch.