Skip to content

Commit

Permalink
Fix optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers authored Oct 6, 2023
1 parent 4e8dfa9 commit 06f479c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(array $attributes = [])
/**
* Renders the provided block
*/
public static function render(string|array $block, array $data = [], ?Controller $controller): string
public static function render(string|array $block, array $data = [], ?Controller $controller = null): string
{
if (!$controller) {
$controller = new Controller();
Expand Down Expand Up @@ -77,7 +77,7 @@ public static function render(string|array $block, array $data = [], ?Controller
/**
* Renders the provided blocks
*/
public static function renderAll(array $blocks, ?Controller $controller): string
public static function renderAll(array $blocks, ?Controller $controller = null): string
{
$content = '';
$controller ??= (new Controller());
Expand Down

0 comments on commit 06f479c

Please sign in to comment.