Skip to content

Commit

Permalink
Move extension to last in signature
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 26, 2024
1 parent 9a07581 commit 15472ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/framework/src/Support/Includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function get(string $filename, ?string $default = null): ?string
*/
public static function html(string $filename, ?string $default = null): ?HtmlString
{
return static::getInclude([static::class, 'renderHtml'], '.html', $default, $filename);
return static::getInclude([static::class, 'renderHtml'], $filename, $default, '.html');
}

/**
Expand All @@ -79,7 +79,7 @@ public static function html(string $filename, ?string $default = null): ?HtmlStr
*/
public static function blade(string $filename, ?string $default = null): ?HtmlString
{
return static::getInclude([static::class, 'renderBlade'], '.blade.php', $default, $filename);
return static::getInclude([static::class, 'renderBlade'], $filename, $default, '.blade.php');
}

/**
Expand All @@ -91,10 +91,10 @@ public static function blade(string $filename, ?string $default = null): ?HtmlSt
*/
public static function markdown(string $filename, ?string $default = null): ?HtmlString
{
return static::getInclude([static::class, 'renderMarkdown'], '.md', $default, $filename);
return static::getInclude([static::class, 'renderMarkdown'], $filename, $default, '.md');
}

protected static function getInclude(callable $method, string $extension, ?string $default, string $filename): ?HtmlString
protected static function getInclude(callable $method, string $filename, ?string $default, string $extension): ?HtmlString
{
$path = static::normalizePath($filename, $extension);
$contents = static::getFileContents(static::path($path));
Expand Down

0 comments on commit 15472ec

Please sign in to comment.