Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 explicit nullable types #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Macros.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function breadcrumb(
Route $route,
$title,
$parent = null,
Closure $relation = null
?Closure $relation = null
): Route {
$registry->withExceptionHandling(function() use ($registry, $route, $title, $parent, $relation) {
if (! $name = $route->getName()) {
Expand Down
8 changes: 4 additions & 4 deletions src/Routing/ResourceBreadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ public function configure(array $config): self
return $this;
}

public function index($title, $parent = null, Closure $relation = null): self
public function index($title, $parent = null, ?Closure $relation = null): self
{
return $this->configureAction('index', $title, $parent, $relation);
}

public function create($title, $parent = null, Closure $relation = null): self
public function create($title, $parent = null, ?Closure $relation = null): self
{
return $this->configureAction('create', $title, $parent, $relation);
}

public function show($title, $parent = null, Closure $relation = null): self
public function show($title, $parent = null, ?Closure $relation = null): self
{
return $this->configureAction('show', $title, $parent, $relation);
}

public function edit($title, $parent = null, Closure $relation = null): self
public function edit($title, $parent = null, ?Closure $relation = null): self
{
return $this->configureAction('edit', $title, $parent, $relation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/View/Breadcrumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
string $title,
string $url,
bool $is_current_page = false,
Breadcrumb $parent = null
?Breadcrumb $parent = null
) {
$this->title = $title;
$this->url = $url;
Expand Down
4 changes: 2 additions & 2 deletions src/View/Components/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function __construct(
RequestBreadcrumbs $breadcrumbs,
Registry $registry,
Repository $config,
string $framework = null,
string $view = null,
?string $framework = null,
?string $view = null,
bool $jsonLd = false,
bool $rdfa = false
) {
Expand Down
4 changes: 2 additions & 2 deletions tests/InlineBlade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class InlineBlade extends View
public function __construct(
string $contents,
$data = [],
Factory $factory = null,
Filesystem $fs = null
?Factory $factory = null,
?Filesystem $fs = null
) {
$this->fs = $fs ?? new Filesystem();

Expand Down