Passed
Push — master ( 430a74...d5390f )
by Caen
03:46 queued 26s
created
packages/testing/src/UnitTestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     protected static function needsKernel(): void
15 15
     {
16
-        if (! self::$hasSetUpKernel) {
16
+        if (!self::$hasSetUpKernel) {
17 17
             self::setupKernel();
18 18
         }
19 19
     }
Please login to merge, or discard this patch.
packages/framework/src/Pages/InMemoryPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             return $this->__call('compile', []);
95 95
         }
96 96
 
97
-        if ($this->getBladeView() && ! $this->getContents()) {
97
+        if ($this->getBladeView() && !$this->getContents()) {
98 98
             if (str_ends_with($this->getBladeView(), '.blade.php')) {
99 99
                 // If the view key is for a Blade file path, we'll use the anonymous view compiler to compile it.
100 100
                 // This allows you to use any arbitrary file, without needing to register its namespace or directory.
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function __call(string $method, array $parameters): mixed
134 134
     {
135
-        if (! $this->hasMacro($method)) {
135
+        if (!$this->hasMacro($method)) {
136 136
             throw new BadMethodCallException(sprintf(
137 137
                 'Method %s::%s does not exist.', static::class, $method
138 138
             ));
Please login to merge, or discard this patch.
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.
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/Foundation/Kernel/RouteCollection.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
 
33 33
     protected function runDiscovery(): void
34 34
     {
35
-        $this->kernel->pages()->each(function (HydePage $page): void {
35
+        $this->kernel->pages()->each(function(HydePage $page): void {
36 36
             $this->addRoute(new Route($page));
37 37
         });
38 38
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getRoutes(?string $pageClass = null): RouteCollection
57 57
     {
58
-        return $pageClass ? $this->filter(function (Route $route) use ($pageClass): bool {
58
+        return $pageClass ? $this->filter(function(Route $route) use ($pageClass) : bool {
59 59
             return $route->getPage() instanceof $pageClass;
60 60
         }) : $this;
61 61
     }
Please login to merge, or discard this patch.
framework/src/Framework/Features/Navigation/DocumentationSidebar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 {
20 20
     protected function generate(): void
21 21
     {
22
-        Routes::getRoutes(DocumentationPage::class)->each(function (Route $route): void {
22
+        Routes::getRoutes(DocumentationPage::class)->each(function(Route $route): void {
23 23
             if ($this->canAddRoute($route)) {
24 24
                 $this->items->put($route->getRouteKey(), NavItem::fromRoute($route));
25 25
             }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /** @return array<string> */
35 35
     public function getGroups(): array
36 36
     {
37
-        return $this->items->map(function (NavItem $item): string {
37
+        return $this->items->map(function(NavItem $item): string {
38 38
             return $item->getGroup();
39 39
         })->unique()->toArray();
40 40
     }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     /** @return Collection<\Hyde\Framework\Features\Navigation\NavItem> */
43 43
     public function getItemsInGroup(?string $group): Collection
44 44
     {
45
-        return $this->items->filter(function (NavItem $item) use ($group): bool {
45
+        return $this->items->filter(function(NavItem $item) use ($group) : bool {
46 46
             return ($item->getGroup() === $group) || ($item->getGroup() === Str::slug($group));
47 47
         })->sortBy('navigation.priority')->values();
48 48
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     protected function canAddRoute(Route $route): bool
57 57
     {
58
-        return parent::canAddRoute($route) && ! $route->is(DocumentationPage::homeRouteName());
58
+        return parent::canAddRoute($route) && !$route->is(DocumentationPage::homeRouteName());
59 59
     }
60 60
 
61 61
     private function isPageIndexPage(): bool
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Navigation/BaseNavigationMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
 
37 37
     protected function generate(): void
38 38
     {
39
-        Routes::each(function (Route $route): void {
39
+        Routes::each(function(Route $route): void {
40 40
             if ($this->canAddRoute($route)) {
41 41
                 $this->items->put($route->getRouteKey(), NavItem::fromRoute($route));
42 42
             }
43 43
         });
44 44
 
45
-        collect(Config::getArray('hyde.navigation.custom', []))->each(function (NavItem $item): void {
45
+        collect(Config::getArray('hyde.navigation.custom', []))->each(function(NavItem $item): void {
46 46
             // Since these were added explicitly by the user, we can assume they should always be shown
47 47
             $this->items->push($item);
48 48
         });
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     protected function removeDuplicateItems(): void
57 57
     {
58
-        $this->items = $this->items->unique(function (NavItem $item): string {
58
+        $this->items = $this->items->unique(function(NavItem $item): string {
59 59
             // Filter using a combination of the group and label to allow duplicate labels in different groups
60 60
             return $item->getGroup().$item->label;
61 61
         });
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
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function generate(): static
32 32
     {
33
-        Routes::all()->each(function (Route $route): void {
33
+        Routes::all()->each(function(Route $route): void {
34 34
             $this->addRoute($route);
35 35
         });
36 36
 
Please login to merge, or discard this patch.