From 4a8d8d9312fce70d73f533414df56ff588a15dde Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 17:54:39 +0200 Subject: [PATCH 01/22] Add array generics for static helper method parameter --- .../src/Framework/Features/Navigation/DropdownNavItem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php index f1adc1cc2d4..571a6e547cb 100644 --- a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php +++ b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php @@ -26,6 +26,7 @@ public function __construct(string $label, array $items, ?int $priority = null) $this->items = $items; } + /** @param array $items */ public static function fromArray(string $name, array $items): static { return new static($name, $items); From cfdc103ccd680a8061ddd2594b72e1bbd90550fb Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 17:59:25 +0200 Subject: [PATCH 02/22] Annotate return collection generics --- packages/framework/src/Foundation/Kernel/Filesystem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Foundation/Kernel/Filesystem.php b/packages/framework/src/Foundation/Kernel/Filesystem.php index a51df395883..f6de78a9bb2 100644 --- a/packages/framework/src/Foundation/Kernel/Filesystem.php +++ b/packages/framework/src/Foundation/Kernel/Filesystem.php @@ -185,6 +185,7 @@ public function unlinkIfExists(string $path): bool return false; } + /** @return \Illuminate\Support\Collection */ public function smartGlob(string $pattern, int $flags = 0): Collection { return collect(\Hyde\Facades\Filesystem::glob($pattern, $flags)) From ec1ccc52e80eadd1139fdec8982f519b306a4eda Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:06:04 +0200 Subject: [PATCH 03/22] Annotate path array generics --- packages/framework/src/Foundation/Kernel/Filesystem.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/framework/src/Foundation/Kernel/Filesystem.php b/packages/framework/src/Foundation/Kernel/Filesystem.php index f6de78a9bb2..dee344e82f1 100644 --- a/packages/framework/src/Foundation/Kernel/Filesystem.php +++ b/packages/framework/src/Foundation/Kernel/Filesystem.php @@ -65,6 +65,8 @@ public function path(string $path = ''): string * Get an absolute file path from a supplied relative path. * * Input types are matched, meaning that if the input is a string so will the output be. + * + * @param string|array $path */ public function pathToAbsolute(string|array $path): string|array { @@ -143,6 +145,8 @@ public function vendorPath(string $path = '', string $package = 'framework'): st /** * Touch one or more files in the project's directory. + * + * @param string|array $path */ public function touch(string|array $path): bool { @@ -159,6 +163,8 @@ public function touch(string|array $path): bool /** * Unlink one or more files in the project's directory. + * + * @param string|array $path */ public function unlink(string|array $path): bool { From 9750ee53831f38d9de93e09d0e5f76f40ab6aeff Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:12:15 +0200 Subject: [PATCH 04/22] Specify collection key generics --- packages/framework/src/Facades/Filesystem.php | 2 +- packages/framework/src/Foundation/Kernel/Filesystem.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Facades/Filesystem.php b/packages/framework/src/Facades/Filesystem.php index d1f3bdadf44..56991dd0604 100644 --- a/packages/framework/src/Facades/Filesystem.php +++ b/packages/framework/src/Facades/Filesystem.php @@ -63,7 +63,7 @@ public static function relativePath(string $path): string * * @param string $pattern * @param int $flags - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public static function smartGlob(string $pattern, int $flags = 0): Collection { diff --git a/packages/framework/src/Foundation/Kernel/Filesystem.php b/packages/framework/src/Foundation/Kernel/Filesystem.php index dee344e82f1..724ac387d3a 100644 --- a/packages/framework/src/Foundation/Kernel/Filesystem.php +++ b/packages/framework/src/Foundation/Kernel/Filesystem.php @@ -191,7 +191,7 @@ public function unlinkIfExists(string $path): bool return false; } - /** @return \Illuminate\Support\Collection */ + /** @return \Illuminate\Support\Collection */ public function smartGlob(string $pattern, int $flags = 0): Collection { return collect(\Hyde\Facades\Filesystem::glob($pattern, $flags)) From 0b4f7492b8339fc95f957a65c5e76fbde95a42f4 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:13:24 +0200 Subject: [PATCH 05/22] Add values call --- packages/framework/src/Foundation/Kernel/Filesystem.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Foundation/Kernel/Filesystem.php b/packages/framework/src/Foundation/Kernel/Filesystem.php index 724ac387d3a..dcc8f79ed73 100644 --- a/packages/framework/src/Foundation/Kernel/Filesystem.php +++ b/packages/framework/src/Foundation/Kernel/Filesystem.php @@ -195,6 +195,7 @@ public function unlinkIfExists(string $path): bool public function smartGlob(string $pattern, int $flags = 0): Collection { return collect(\Hyde\Facades\Filesystem::glob($pattern, $flags)) - ->map(fn (string $path): string => $this->pathToRelative($path)); + ->map(fn (string $path): string => $this->pathToRelative($path)) + ->values(); } } From ab5bb325aeab08202f4a17194cead3d92f90e996 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:17:52 +0200 Subject: [PATCH 06/22] Annotate config generics --- .../src/Framework/Features/Navigation/DropdownNavItem.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php index 571a6e547cb..e20d1a49c47 100644 --- a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php +++ b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php @@ -39,10 +39,13 @@ public function getItems(): Collection private function searchForDropdownPriorityInNavigationConfig(string $groupKey): ?int { - return Config::getArray('hyde.navigation.order', [ + /** @var array $config */ + $config = Config::getArray('hyde.navigation.order', [ 'index' => 0, 'posts' => 10, 'docs/index' => 100, - ])[$groupKey] ?? null; + ]); + + return $config[$groupKey] ?? null; } } From 257f69b3f6bd6ffd9d31edaf5c50322cb1bc4f90 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:26:50 +0200 Subject: [PATCH 07/22] Annotate metadata bag generics --- .../src/Framework/Features/Metadata/MetadataBag.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php index e39c6171e24..f0df78363e8 100644 --- a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php +++ b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php @@ -20,9 +20,16 @@ */ class MetadataBag implements Htmlable { + /** @var array */ protected array $links = []; + + /** @var array */ protected array $metadata = []; + + /** @var array */ protected array $properties = []; + + /** @var array */ protected array $generics = []; public function toHtml(): string From 7d0de8c4a1cdd188be96ceeeb66075600aa60e74 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:27:59 +0200 Subject: [PATCH 08/22] Add string cast to last branch --- .../framework/src/Framework/Features/Metadata/MetadataBag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php index f0df78363e8..3248a4c0a9e 100644 --- a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php +++ b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php @@ -66,7 +66,7 @@ public function add(MetadataElementContract|string $element): static return $this->addElement('properties', $element); } - return $this->addGenericElement($element); + return $this->addGenericElement((string) $element); } protected function addElement(string $type, MetadataElementContract $element): static From 9eb57c5634c3633537fce8e686b1ab10ac4c298d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:36:57 +0200 Subject: [PATCH 09/22] Annotate return array generics --- .../framework/src/Framework/Features/Metadata/MetadataBag.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php index 3248a4c0a9e..ab8a30abb92 100644 --- a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php +++ b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php @@ -83,6 +83,7 @@ protected function addGenericElement(string $element): static return $this; } + /** @return array */ protected function getPrefixedArray(string $type): array { $array = []; From 426c54f58948d33353b7e78741b12b55f157755d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 18:39:57 +0200 Subject: [PATCH 10/22] Annotate full loop generics --- .../src/Framework/Features/Metadata/MetadataBag.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php index ab8a30abb92..5d0c2aa40d6 100644 --- a/packages/framework/src/Framework/Features/Metadata/MetadataBag.php +++ b/packages/framework/src/Framework/Features/Metadata/MetadataBag.php @@ -86,10 +86,12 @@ protected function addGenericElement(string $element): static /** @return array */ protected function getPrefixedArray(string $type): array { + /** @var array $bag */ + $bag = $this->{$type}; + $array = []; - /** @var MetadataElementContract $element */ - foreach ($this->{$type} as $key => $element) { + foreach ($bag as $key => $element) { $array["$type:$key"] = $element; } From 27722a697fcde26bf62e16b5ec5a6ee99d28b467 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:03:59 +0200 Subject: [PATCH 11/22] Annotate array return generics --- .../src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php b/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php index d7ea838fdb0..5cf3ef41f65 100644 --- a/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php +++ b/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php @@ -57,6 +57,7 @@ protected function askIfUnsafeDirectoryShouldBeEmptied(): bool )); } + /** @return array */ protected function safeOutputDirectories(): array { return Config::getArray('hyde.safe_output_directories', ['_site', 'docs', 'build']); From 533790014e275ba5602265b5abe08d34da9e2e77 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:05:27 +0200 Subject: [PATCH 12/22] Add collection generics for return value --- .../src/Framework/Features/Navigation/DropdownNavItem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php index e20d1a49c47..aef24a99973 100644 --- a/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php +++ b/packages/framework/src/Framework/Features/Navigation/DropdownNavItem.php @@ -32,6 +32,7 @@ public static function fromArray(string $name, array $items): static return new static($name, $items); } + /** @return Collection */ public function getItems(): Collection { return collect($this->items); From 8eb1d804a1750ce80e3b2fd71fc10dc2e2315f56 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:08:44 +0200 Subject: [PATCH 13/22] Annotate command data generics --- .../framework/src/Console/Commands/PublishHomepageCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/framework/src/Console/Commands/PublishHomepageCommand.php b/packages/framework/src/Console/Commands/PublishHomepageCommand.php index 9b10552f81e..05744d01028 100644 --- a/packages/framework/src/Console/Commands/PublishHomepageCommand.php +++ b/packages/framework/src/Console/Commands/PublishHomepageCommand.php @@ -31,6 +31,7 @@ class PublishHomepageCommand extends Command /** @var string */ protected $description = 'Publish one of the default homepages to index.blade.php.'; + /** @var array */ protected array $options = [ 'welcome'=> [ 'name' => 'Welcome', @@ -96,6 +97,7 @@ protected function formatPublishableChoices(): array })->values()->toArray(); } + /** @return Collection */ protected function getTemplateOptions(): Collection { return new Collection($this->options); From c242e50f9ef17b707b893175ba5fe913fc3aa405 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:29:17 +0200 Subject: [PATCH 14/22] Narrow down parsed BladeMatter array types --- RELEASE_NOTES.md | 1 + .../framework/src/Framework/Actions/BladeMatterParser.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b3ce7020324..1e4e28f031e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -20,6 +20,7 @@ This serves two purposes: - Updated the realtime compiler server configuration options in https://github.com/hydephp/develop/pull/1395 (backwards compatible) - Updated the realtime compiler to generate the documentation search index each time it's requested in https://github.com/hydephp/develop/pull/1405 (fixes https://github.com/hydephp/develop/issues/1404) - Updated the navigation menu generator to remove duplicates after running the sorting method in https://github.com/hydephp/develop/pull/1407 (fixes https://github.com/hydephp/develop/issues/1406) +- Narrows down parsed `BladeMatter` array types to `array` (Experimental feature not covered by BC promise) in https://github.com/hydephp/develop/pull/1410 ### Deprecated - for soon-to-be removed features. diff --git a/packages/framework/src/Framework/Actions/BladeMatterParser.php b/packages/framework/src/Framework/Actions/BladeMatterParser.php index 78aefd59605..1f6c03f2530 100644 --- a/packages/framework/src/Framework/Actions/BladeMatterParser.php +++ b/packages/framework/src/Framework/Actions/BladeMatterParser.php @@ -121,6 +121,7 @@ protected static function extractValue(string $line): string return trim($key); } + /** @return scalar|array */ protected static function getValueWithType(string $value): mixed { $value = trim($value); @@ -138,6 +139,7 @@ protected static function getValueWithType(string $value): mixed return json_decode($value) ?? $value; } + /** @return array */ protected static function parseArrayString(string $string): array { $array = []; @@ -167,7 +169,9 @@ protected static function parseArrayString(string $string): array $pair = explode('=>', $token); // Add key/value pair to array - $array[static::getValueWithType(trim(trim($pair[0]), "'"))] = static::getValueWithType(trim(trim($pair[1]), "'")); + $key = (string) static::getValueWithType(trim(trim($pair[0]), "'")); + $value = static::getValueWithType(trim(trim($pair[1]), "'")); + $array[$key] = $value; } return $array; From 85de4267edf72732cb7eac5ebe31316a7d289928 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:36:12 +0200 Subject: [PATCH 15/22] Add generic array annotation --- packages/framework/src/Framework/Services/BuildTaskService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Services/BuildTaskService.php b/packages/framework/src/Framework/Services/BuildTaskService.php index 2e58293b551..0b713144708 100644 --- a/packages/framework/src/Framework/Services/BuildTaskService.php +++ b/packages/framework/src/Framework/Services/BuildTaskService.php @@ -94,6 +94,7 @@ protected function registerIf(string $task, bool $condition): void } } + /** @param array<\Hyde\Framework\Features\BuildTasks\PreBuildTask|\Hyde\Framework\Features\BuildTasks\PostBuildTask|class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask|\Hyde\Framework\Features\BuildTasks\PostBuildTask>> $tasks */ protected function registerTasks(array $tasks): void { foreach ($tasks as $task) { From cc5f355b379c15f9f3e6de504d6d7ef82fe9594a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:36:35 +0200 Subject: [PATCH 16/22] Annotate class string parameter --- packages/framework/src/Framework/Services/BuildTaskService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Services/BuildTaskService.php b/packages/framework/src/Framework/Services/BuildTaskService.php index 0b713144708..13652c3f0c8 100644 --- a/packages/framework/src/Framework/Services/BuildTaskService.php +++ b/packages/framework/src/Framework/Services/BuildTaskService.php @@ -87,6 +87,7 @@ protected function registerTaskInService(PreBuildTask|PostBuildTask $task): void $this->buildTasks[$this->makeTaskIdentifier($task)] = $task; } + /** @param class-string<\Hyde\Framework\Features\BuildTasks\PreBuildTask|\Hyde\Framework\Features\BuildTasks\PostBuildTask> $task */ protected function registerIf(string $task, bool $condition): void { if ($condition) { From 6fedad8089f230d90c1f712b43f4b3774ce5279c Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:39:20 +0200 Subject: [PATCH 17/22] Annotate class string array return generics --- packages/framework/src/Framework/Services/BuildTaskService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Services/BuildTaskService.php b/packages/framework/src/Framework/Services/BuildTaskService.php index 13652c3f0c8..9c57e6f5bd1 100644 --- a/packages/framework/src/Framework/Services/BuildTaskService.php +++ b/packages/framework/src/Framework/Services/BuildTaskService.php @@ -103,6 +103,7 @@ protected function registerTasks(array $tasks): void } } + /** @return array> */ protected function findTasksInAppDirectory(): array { return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string { From b2b9ae632c6be173e140556acf02b4648215e93d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:42:35 +0200 Subject: [PATCH 18/22] Extract helper method for increased type coverage --- .../framework/src/Framework/Services/BuildTaskService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Framework/Services/BuildTaskService.php b/packages/framework/src/Framework/Services/BuildTaskService.php index 9c57e6f5bd1..f3cfe327ba9 100644 --- a/packages/framework/src/Framework/Services/BuildTaskService.php +++ b/packages/framework/src/Framework/Services/BuildTaskService.php @@ -42,7 +42,7 @@ public function __construct() { $this->registerFrameworkTasks(); - $this->registerTasks(Config::getArray('hyde.build_tasks', [])); + $this->registerTasks($this->findTasksInConfig()); $this->registerTasks($this->findTasksInAppDirectory()); } @@ -103,6 +103,12 @@ protected function registerTasks(array $tasks): void } } + /** @return array> */ + protected function findTasksInConfig(): array + { + return Config::getArray('hyde.build_tasks', []); + } + /** @return array> */ protected function findTasksInAppDirectory(): array { From 7037a3fd3ae17fdb108ea37d93671d74ddde1f9f Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:44:06 +0200 Subject: [PATCH 19/22] Narrow down base class type hints to implementation unions --- .../framework/src/Framework/Services/BuildTaskService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/framework/src/Framework/Services/BuildTaskService.php b/packages/framework/src/Framework/Services/BuildTaskService.php index f3cfe327ba9..a976526e214 100644 --- a/packages/framework/src/Framework/Services/BuildTaskService.php +++ b/packages/framework/src/Framework/Services/BuildTaskService.php @@ -52,7 +52,7 @@ public function setOutput(?OutputStyle $output): void $this->output = $output; } - /** @return array> */ + /** @return array|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */ public function getRegisteredTasks(): array { return array_map(fn (BuildTask $task): string => $task::class, array_values($this->buildTasks)); @@ -103,13 +103,13 @@ protected function registerTasks(array $tasks): void } } - /** @return array> */ + /** @return array|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */ protected function findTasksInConfig(): array { return Config::getArray('hyde.build_tasks', []); } - /** @return array> */ + /** @return array|class-string<\Hyde\Framework\Features\BuildTasks\PostBuildTask>> */ protected function findTasksInAppDirectory(): array { return Filesystem::smartGlob('app/Actions/*BuildTask.php')->map(function (string $file): string { From b1318e66726d4e4a71172c2da661240b914a0ad4 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:47:36 +0200 Subject: [PATCH 20/22] Add generic variable annotation --- .../src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php b/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php index 5cf3ef41f65..d03c6a9dedf 100644 --- a/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php +++ b/packages/framework/src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php @@ -60,6 +60,7 @@ protected function askIfUnsafeDirectoryShouldBeEmptied(): bool /** @return array */ protected function safeOutputDirectories(): array { + /** @var array $directories */ return Config::getArray('hyde.safe_output_directories', ['_site', 'docs', 'build']); } } From d03b7f0606bcbbe20e26eab0e2430b6da2ae58b4 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:54:17 +0200 Subject: [PATCH 21/22] Add class string parameter type annotation --- .../framework/src/Framework/Factories/NavigationDataFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/src/Framework/Factories/NavigationDataFactory.php b/packages/framework/src/Framework/Factories/NavigationDataFactory.php index 3c8267f8f75..3068855c630 100644 --- a/packages/framework/src/Framework/Factories/NavigationDataFactory.php +++ b/packages/framework/src/Framework/Factories/NavigationDataFactory.php @@ -201,6 +201,7 @@ protected function getSubdirectoryConfiguration(): string return Config::getString('hyde.navigation.subdirectories', 'hidden'); } + /** @param class-string $class */ protected function isInstanceOf(string $class): bool { return is_a($this->pageClass, $class, true); From d8c09bd8cb737c66ce7ccec62f60c91b5a5a269b Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 19:59:37 +0200 Subject: [PATCH 22/22] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b78b8026241..b9119bd8bb5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -22,6 +22,7 @@ This serves two purposes: - Updated the navigation menu generator to remove duplicates after running the sorting method in https://github.com/hydephp/develop/pull/1407 (fixes https://github.com/hydephp/develop/issues/1406) - Updated the exception message caused by missing source option for featured images to include the path of the file that caused the error in https://github.com/hydephp/develop/pull/1409 - Narrows down parsed `BladeMatter` array types to `array` (Experimental feature not covered by BC promise) in https://github.com/hydephp/develop/pull/1410 +- Internal code refactors and improvements in https://github.com/hydephp/develop/pull/1410 ### Deprecated - for soon-to-be removed features.