Skip to content

Commit

Permalink
Change HydePage return types to static
Browse files Browse the repository at this point in the history
Gives better IDE support, and unifies the class return types as other methods also return static.
  • Loading branch information
caendesilva authored May 7, 2023
1 parent 9797b89 commit e11f339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/framework/src/Pages/Concerns/HydePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function isDiscoverable(): bool
*
* @throws \Hyde\Framework\Exceptions\FileNotFoundException If the page does not exist.
*/
public static function get(string $identifier): HydePage
public static function get(string $identifier): static
{
return Pages::getPage(static::sourcePath($identifier));
}
Expand All @@ -118,7 +118,7 @@ public static function get(string $identifier): HydePage
*
* @throws \Hyde\Framework\Exceptions\FileNotFoundException If the file does not exist.
*/
public static function parse(string $identifier): HydePage
public static function parse(string $identifier): static
{
return (new SourceFileParser(static::class, $identifier))->get();
}
Expand Down

0 comments on commit e11f339

Please sign in to comment.