Passed
Push — master ( 2bb448...1a2e13 )
by Caen
03:13
created
packages/framework/src/Foundation/Concerns/ManagesExtensions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             throw new BadMethodCallException('Cannot register an extension after the Kernel has been booted.');
40 40
         }
41 41
 
42
-        if (! is_subclass_of($extension, HydeExtension::class)) {
42
+        if (!is_subclass_of($extension, HydeExtension::class)) {
43 43
             // We want to make sure that the extension class extends the HydeExtension class,
44 44
             // so that we won't have to check the methods we need to call exist later on.
45 45
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getExtension(string $extension): HydeExtension
65 65
     {
66
-        if (! isset($this->extensions[$extension])) {
66
+        if (!isset($this->extensions[$extension])) {
67 67
             throw new InvalidArgumentException("Extension [$extension] is not registered.");
68 68
         }
69 69
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */
96 96
     public function getRegisteredPageClasses(): array
97 97
     {
98
-        return array_unique(array_merge(...array_map(function (string $extension): array {
98
+        return array_unique(array_merge(...array_map(function(string $extension): array {
99 99
             /** @var <class-string<\Hyde\Foundation\Concerns\HydeExtension>> $extension */
100 100
             return $extension::getPageClasses();
101 101
         }, $this->getRegisteredExtensions())));
Please login to merge, or discard this patch.
monorepo/scripts/ping-openanalytics-testrunner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     exit(0);
18 18
 }
19 19
 
20
-if (! file_exists('report.xml')) {
20
+if (!file_exists('report.xml')) {
21 21
     exit(404);
22 22
 }
23 23
 
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Navigation/BaseNavigationMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
     /** @return $this */
31 31
     public function generate(): static
32 32
     {
33
-        Routes::each(function (Route $route): void {
33
+        Routes::each(function(Route $route): void {
34 34
             $this->items->put($route->getRouteKey(), NavItem::fromRoute($route));
35 35
         });
36 36
 
37
-        collect(config('hyde.navigation.custom', []))->each(function (NavItem $item): void {
37
+        collect(config('hyde.navigation.custom', []))->each(function(NavItem $item): void {
38 38
             $this->items->push($item);
39 39
         });
40 40
 
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 
61 61
     protected function filterHiddenItems(): Collection
62 62
     {
63
-        return $this->items->reject(function (NavItem $item): bool {
63
+        return $this->items->reject(function(NavItem $item): bool {
64 64
             return $this->shouldItemBeHidden($item);
65 65
         })->values();
66 66
     }
67 67
 
68 68
     protected function filterDuplicateItems(): Collection
69 69
     {
70
-        return $this->items->unique(function (NavItem $item): string {
70
+        return $this->items->unique(function(NavItem $item): string {
71 71
             return $item->getGroup().$item->label;
72 72
         });
73 73
     }
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
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 
106 106
     protected function findTasksInAppDirectory(): array
107 107
     {
108
-        return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string {
108
+        return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function(string $file): string {
109 109
             return static::pathToClassName($file);
110 110
         })->toArray();
111 111
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/BuildTasks/BuildTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     {
40 40
         $this->startClock();
41 41
 
42
-        if ($output && ! $this->output) {
42
+        if ($output && !$this->output) {
43 43
             $this->setOutput($output);
44 44
         }
45 45
 
Please login to merge, or discard this patch.
framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     protected function isItSafeToCleanOutputDirectory(): bool
34 34
     {
35
-        if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) {
35
+        if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) {
36 36
             $this->info('Output directory will not be emptied.');
37 37
 
38 38
             return false;
Please login to merge, or discard this patch.
packages/framework/src/Support/DataCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         static::needsDirectory(static::$sourceDirectory);
50 50
 
51
-        return new static(DataCollection::findFiles($name, 'md')->mapWithKeys(function (string $file): array {
51
+        return new static(DataCollection::findFiles($name, 'md')->mapWithKeys(function(string $file): array {
52 52
             return [static::makeIdentifier($file) => (new MarkdownFileParser($file))->get()];
53 53
         }));
54 54
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         static::needsDirectory(static::$sourceDirectory);
66 66
 
67
-        return new static(DataCollection::findFiles($name, ['yaml', 'yml'])->mapWithKeys(function (string $file): array {
67
+        return new static(DataCollection::findFiles($name, ['yaml', 'yml'])->mapWithKeys(function(string $file): array {
68 68
             return [static::makeIdentifier($file) => (new MarkdownFileParser($file))->get()->matter()];
69 69
         }));
70 70
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         static::needsDirectory(static::$sourceDirectory);
82 82
 
83
-        return new static(DataCollection::findFiles($name, 'json')->mapWithKeys(function (string $file) use ($asArray): array {
83
+        return new static(DataCollection::findFiles($name, 'json')->mapWithKeys(function(string $file) use ($asArray): array {
84 84
             return [static::makeIdentifier($file) => json_decode(Filesystem::get($file), $asArray)];
85 85
         }));
86 86
     }
Please login to merge, or discard this patch.
framework/src/Framework/Features/XmlGenerators/SitemapGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
     public function generate(): static
31 31
     {
32
-        \Hyde\Facades\Route::all()->each(function (Route $route): void {
32
+        \Hyde\Facades\Route::all()->each(function(Route $route): void {
33 33
             $this->addRoute($route);
34 34
         });
35 35
 
Please login to merge, or discard this patch.
packages/framework/src/Framework/Services/BuildService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function compileStaticPages(): void
43 43
     {
44
-        collect($this->getPageTypes())->each(function (string $pageClass): void {
44
+        collect($this->getPageTypes())->each(function(string $pageClass): void {
45 45
             $this->compilePagesForClass($pageClass);
46 46
         });
47 47
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $this->needsDirectory(Hyde::siteMediaPath());
52 52
 
53 53
         $this->comment('Transferring Media Assets...');
54
-        $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function (string $filepath): void {
54
+        $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function(string $filepath): void {
55 55
             $sitePath = Hyde::siteMediaPath(Str::after($filepath, Hyde::mediaPath()));
56 56
             $this->needsParentDirectory($sitePath);
57 57
             copy($filepath, $sitePath);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         $collection = Routes::getRoutes($pageClass);
71 71
 
72
-        $this->withProgressBar($collection, function (Route $route): void {
72
+        $this->withProgressBar($collection, function(Route $route): void {
73 73
             (new StaticPageBuilder($route->getPage()))->__invoke();
74 74
         });
75 75
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     /** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */
85 85
     protected function getPageTypes(): array
86 86
     {
87
-        return Hyde::pages()->map(function (HydePage $page): string {
87
+        return Hyde::pages()->map(function(HydePage $page): string {
88 88
             return $page::class;
89 89
         })->unique()->values()->toArray();
90 90
     }
Please login to merge, or discard this patch.