Passed
Push — master ( 819b66...4a7870 )
by Caen
03:34
created
framework/src/Framework/Features/Navigation/NumericalPageOrderingHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         if (isset($parentPath)) {
54 54
             $parentPaths = explode('/', $parentPath);
55
-            $parentPaths = array_map(function (string $part): string {
55
+            $parentPaths = array_map(function(string $part): string {
56 56
                 return static::hasNumericalPrefix($part) ? static::splitNumericPrefix($part)[1] : $part;
57 57
             }, $parentPaths);
58 58
             $parentPath = implode('/', $parentPaths);
Please login to merge, or discard this patch.
framework/src/Framework/Features/Navigation/DocumentationSidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getActiveGroup(): ?NavigationGroup
68 68
     {
69
-        if ($this->items->isEmpty() || (! $this->hasGroups()) || (! $this->isCollapsible()) || Render::getPage() === null) {
69
+        if ($this->items->isEmpty() || (!$this->hasGroups()) || (!$this->isCollapsible()) || Render::getPage() === null) {
70 70
             return null;
71 71
         }
72 72
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
 
80 80
         /** @var ?NavigationGroup $first */
81
-        $first = $this->items->first(function (NavigationGroup $group) use ($currentPage): bool {
81
+        $first = $this->items->first(function(NavigationGroup $group) use ($currentPage): bool {
82 82
             // A group is active when it contains the current page being rendered.
83 83
             return $currentPage->navigationMenuGroup() && $group->getGroupKey() === NavigationGroup::normalizeGroupKey($currentPage->navigationMenuGroup());
84 84
         });
Please login to merge, or discard this patch.
packages/framework/src/Framework/Features/Navigation/NavigationGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
     protected function containsOnlyDocumentationPages(): bool
54 54
     {
55
-        return count($this->getItems()) && $this->getItems()->every(function (NavigationItem $item): bool {
55
+        return count($this->getItems()) && $this->getItems()->every(function(NavigationItem $item): bool {
56 56
             return $item->getPage() instanceof DocumentationPage;
57 57
         });
58 58
     }
Please login to merge, or discard this patch.
framework/src/Framework/Features/Navigation/NavigationMenuGenerator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     protected function generate(): void
68 68
     {
69
-        $this->routes->each(function (Route $route): void {
69
+        $this->routes->each(function(Route $route): void {
70 70
             if ($this->canAddRoute($route)) {
71 71
                 if ($this->canGroupRoute($route)) {
72 72
                     $this->addRouteToGroup($route);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 $this->items->push(NavigationItem::create(DocumentationPage::home()));
83 83
             }
84 84
         } else {
85
-            collect(Config::getArray('hyde.navigation.custom', []))->each(function (array $data): void {
85
+            collect(Config::getArray('hyde.navigation.custom', []))->each(function(array $data): void {
86 86
                 /** @var array{destination: string, label: ?string, priority: ?int, attributes: array<string, scalar>} $data */
87 87
                 $message = 'Invalid navigation item configuration detected the configuration file. Please double check the syntax.';
88 88
                 $item = InvalidConfigurationException::try(fn () => NavigationItem::create(...$data), $message);
@@ -107,28 +107,28 @@  discard block
 block discarded – undo
107 107
 
108 108
     protected function canAddRoute(Route $route): bool
109 109
     {
110
-        if (! $route->getPage()->showInNavigation()) {
110
+        if (!$route->getPage()->showInNavigation()) {
111 111
             return false;
112 112
         }
113 113
 
114 114
         if ($this->generatesSidebar) {
115 115
             // Since the index page is linked in the header, we don't want it in the sidebar
116
-            return ! $route->is(DocumentationPage::homeRouteName());
116
+            return !$route->is(DocumentationPage::homeRouteName());
117 117
         } else {
118 118
             // While we for the most part can rely on the navigation visibility state provided by the navigation data factory,
119 119
             // we need to make an exception for documentation pages, which generally have a visible state, as the data is
120 120
             // also used in the sidebar. But we only want the documentation index page to be in the main navigation.
121
-            return ! $route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName());
121
+            return !$route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName());
122 122
         }
123 123
     }
124 124
 
125 125
     protected function canGroupRoute(Route $route): bool
126 126
     {
127
-        if (! $this->generatesSidebar) {
127
+        if (!$this->generatesSidebar) {
128 128
             return $route->getPage()->navigationMenuGroup() !== null;
129 129
         }
130 130
 
131
-        if (! $this->usesGroups) {
131
+        if (!$this->usesGroups) {
132 132
             return false;
133 133
         }
134 134
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
         $groupItem->add($item);
148 148
 
149
-        if (! $this->items->has($groupItem->getGroupKey())) {
149
+        if (!$this->items->has($groupItem->getGroupKey())) {
150 150
             $this->items->put($groupItem->getGroupKey(), $groupItem);
151 151
         }
152 152
     }
Please login to merge, or discard this patch.
framework/src/Framework/Actions/GeneratesDocumentationSearchIndex.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 
43 43
     protected function run(): void
44 44
     {
45
-        DocumentationPage::all()->each(function (DocumentationPage $page): void {
46
-            if (! in_array($page->identifier, $this->getPagesToExcludeFromSearch())) {
45
+        DocumentationPage::all()->each(function(DocumentationPage $page): void {
46
+            if (!in_array($page->identifier, $this->getPagesToExcludeFromSearch())) {
47 47
                 $this->index->push($this->generatePageEntry($page));
48 48
             }
49 49
         });
Please login to merge, or discard this patch.
framework/src/Framework/Actions/PreBuildTasks/TransferMediaAssets.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
             $this->skip("No media files to transfer.\n");
31 31
         }
32 32
 
33
-        $this->withProgressBar($files, function (MediaFile $file): void {
33
+        $this->withProgressBar($files, function(MediaFile $file): void {
34 34
             $sitePath = $file->getOutputPath();
35 35
             $this->needsParentDirectory($sitePath);
36 36
             Filesystem::putContents($sitePath, $file->getContents());
Please login to merge, or discard this patch.
packages/framework/src/Framework/Exceptions/ParseException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function __construct(string $file = '', ?Throwable $previous = null)
22 22
     {
23
-        parent::__construct($this->formatMessage($file, $previous), previous: $previous);
23
+        parent::__construct($this->formatMessage($file, $previous), previous : $previous);
24 24
     }
25 25
 
26 26
     protected function formatMessage(string $file, ?Throwable $previous): string
Please login to merge, or discard this patch.
src/Markdown/Contracts/FrontMatter/SubSchemas/FeaturedImageSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public const FEATURED_IMAGE_SCHEMA = [
16 16
         'source' => 'string', // Name of a file in _media/ or a remote URL (required)
17 17
         'altText' => 'string', // The alt text (important for accessibility)
18
-        'alt' => 'string',     // Alternative to altText (simplified schema)
18
+        'alt' => 'string', // Alternative to altText (simplified schema)
19 19
         'titleText' => 'string', // The title text (hover tooltip & metadata)
20 20
         'caption' => 'string', // The caption text (simplified schema)
21 21
         'licenseName' => 'string', // The name of the license (e.g. "CC BY 4.0")
Please login to merge, or discard this patch.
packages/framework/src/Markdown/Processing/HeadingRenderer.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
     public function render(Node $node, ChildNodeRendererInterface $childRenderer): string
37 37
     {
38
-        if (! ($node instanceof Heading)) {
38
+        if (!($node instanceof Heading)) {
39 39
             throw new \InvalidArgumentException('Incompatible node type: '.get_class($node));
40 40
         }
41 41
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return config('markdown.permalinks.enabled', true)
59 59
             && $level >= config('markdown.permalinks.min_level', 2)
60 60
             && $level <= config('markdown.permalinks.max_level', 6)
61
-            && ! str_contains($content, 'class="heading-permalink"')
61
+            && !str_contains($content, 'class="heading-permalink"')
62 62
             && in_array($this->pageClass, config('markdown.permalinks.pages', [DocumentationPage::class]));
63 63
     }
64 64
 
Please login to merge, or discard this patch.