Passed
Push — master ( 1d8f1f...cf6496 )
by Caen
03:40
created
packages/framework/src/Framework/Actions/PostBuildTasks/GenerateSitemap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public function handle(): void
23 23
     {
24
-        if (! Hyde::hasSiteUrl()) {
24
+        if (!Hyde::hasSiteUrl()) {
25 25
             $this->skip('Cannot generate sitemap without a valid base URL');
26 26
         }
27 27
 
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Internal/YamlConfigurationRepository.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
         if ($this->hasYamlConfigFile()) {
31 31
             $data = $this->parseYamlFile();
32 32
 
33
-            if (! self::configurationContainsNamespaces($data)) {
33
+            if (!self::configurationContainsNamespaces($data)) {
34 34
                 $data = ['hyde' => $data];
35 35
             }
36 36
 
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Internal/LoadYamlEnvironmentVariables.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     protected function canInjectSiteNameEnvironmentVariable(): bool
36 36
     {
37
-        return $this->yamlHasSiteNameSet() && ! $this->alreadyHasEnvironmentVariable();
37
+        return $this->yamlHasSiteNameSet() && !$this->alreadyHasEnvironmentVariable();
38 38
     }
39 39
 
40 40
     protected function alreadyHasEnvironmentVariable(): bool
Please login to merge, or discard this patch.
packages/framework/src/Foundation/Kernel/PageCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     protected function runDiscovery(): void
37 37
     {
38
-        $this->kernel->files()->each(function (SourceFile $file): void {
38
+        $this->kernel->files()->each(function(SourceFile $file): void {
39 39
             $this->addPage($this->parsePage($file->pageClass, $file->getPath()));
40 40
         });
41 41
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     /** @param  class-string<\Hyde\Pages\Concerns\HydePage>|null  $pageClass */
63 63
     public function getPages(?string $pageClass = null): PageCollection
64 64
     {
65
-        return $pageClass ? $this->filter(function (HydePage $page) use ($pageClass): bool {
65
+        return $pageClass ? $this->filter(function(HydePage $page) use ($pageClass) : bool {
66 66
             return $page instanceof $pageClass;
67 67
         }) : $this;
68 68
     }
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
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     protected function runDiscovery(): void
38 38
     {
39
-        $this->kernel->pages()->each(function (HydePage $page): void {
39
+        $this->kernel->pages()->each(function(HydePage $page): void {
40 40
             $this->addRoute(new Route($page));
41 41
         });
42 42
     }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /** @param  class-string<\Hyde\Pages\Concerns\HydePage>|null  $pageClass */
57 57
     public function getRoutes(?string $pageClass = null): RouteCollection
58 58
     {
59
-        return $pageClass ? $this->filter(function (Route $route) use ($pageClass): bool {
59
+        return $pageClass ? $this->filter(function(Route $route) use ($pageClass) : bool {
60 60
             return $route->getPage() instanceof $pageClass;
61 61
         }) : $this;
62 62
     }
Please login to merge, or discard this patch.
packages/testing/src/FluentTestingHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
      */
85 85
     private function formatArray(array $array): string
86 86
     {
87
-        $json = json_encode($array, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
87
+        $json = json_encode($array, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
88 88
 
89 89
         // Transform JSON to PHP array syntax
90 90
         $php = preg_replace('/^(\s*)\"(\w+)\":/m', '$1$2:', $json); // Remove quotes from keys
Please login to merge, or discard this patch.
packages/testing/src/UnitTestCase.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     protected static function mockRender(): Render
55 55
     {
56
-        return tap(new Render(), function () {
56
+        return tap(new Render(), function() {
57 57
             Render::swap(new RenderData());
58 58
         });
59 59
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     protected static function mockConfig(array $items = []): void
67 67
     {
68
-        Config::swap(tap(new Repository($items), function ($config) {
68
+        Config::swap(tap(new Repository($items), function($config) {
69 69
             app()->instance('config', $config);
70 70
         }));
71 71
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /** @return \Illuminate\Filesystem\Filesystem&\Mockery\MockInterface */
74 74
     protected function mockFilesystem(array $methods = []): Filesystem
75 75
     {
76
-        return tap(Mockery::mock(Filesystem::class, $methods)->makePartial(), function ($filesystem) {
76
+        return tap(Mockery::mock(Filesystem::class, $methods)->makePartial(), function($filesystem) {
77 77
             app()->instance(Filesystem::class, $filesystem);
78 78
         });
79 79
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /** @return \Illuminate\Filesystem\Filesystem&\Mockery\MockInterface */
82 82
     protected function mockFilesystemStrict(array $methods = []): Filesystem
83 83
     {
84
-        return tap(Mockery::mock(Filesystem::class, $methods), function ($filesystem) {
84
+        return tap(Mockery::mock(Filesystem::class, $methods), function($filesystem) {
85 85
             app()->instance(Filesystem::class, $filesystem);
86 86
         });
87 87
     }
Please login to merge, or discard this patch.
packages/testing/src/Support/HtmlTesting/TestableHtmlDocument.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $element = $this->query($selector);
69 69
 
70
-        if (! $element) {
70
+        if (!$element) {
71 71
             PHPUnit::fail("No element matching the selector '$selector' was found in the HTML.");
72 72
         }
73 73
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $nodes = new Collection();
152 152
         $dom = new DOMDocument();
153 153
 
154
-        $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET | LIBXML_NOXMLDECL | LIBXML_COMPACT | LIBXML_PARSEHUGE);
154
+        $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NOERROR|LIBXML_NOWARNING|LIBXML_NONET|LIBXML_NOXMLDECL|LIBXML_COMPACT|LIBXML_PARSEHUGE);
155 155
 
156 156
         // Initiate recursive parsing from the root element
157 157
         foreach ($dom->childNodes as $childNode) {
Please login to merge, or discard this patch.
packages/framework/src/Framework/Actions/Internal/FileFinder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public static function handle(string $directory, array|string|false $matchExtensions = false, bool $recursive = false): Collection
23 23
     {
24
-        if (! Filesystem::isDirectory($directory)) {
24
+        if (!Filesystem::isDirectory($directory)) {
25 25
             return collect();
26 26
         }
27 27
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $finder->name(static::buildFileExtensionPattern((array) $matchExtensions));
36 36
         }
37 37
 
38
-        return collect($finder)->map(function (SplFileInfo $file): string {
38
+        return collect($finder)->map(function(SplFileInfo $file): string {
39 39
             return Hyde::pathToRelative($file->getPathname());
40 40
         })->sort()->values();
41 41
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     /** @param array<string> $extensions */
52 52
     private static function expandCommaSeparatedValues(array $extensions): array
53 53
     {
54
-        return array_merge(...array_map(function (string $item): array {
54
+        return array_merge(...array_map(function(string $item): array {
55 55
             return array_map(fn (string $item): string => trim($item), explode(',', $item));
56 56
         }, $extensions));
57 57
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     /** @param array<string> $extensions */
60 60
     private static function normalizeExtensionForRegexPattern(array $extensions): string
61 61
     {
62
-        return implode('|', array_map(function (string $extension): string {
62
+        return implode('|', array_map(function(string $extension): string {
63 63
             return preg_quote(ltrim($extension, '.'), '/');
64 64
         }, $extensions));
65 65
     }
Please login to merge, or discard this patch.