Skip to content
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 source/FluidXml/FluidContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function __invoke(...$query): FluidContext
return $this->query(...$query);
}

public function times($times, callable $fn = null): FluidRepeater|static
public function times($times, ?callable $fn = null): FluidRepeater|static
{
if ($fn === null) {
return new FluidRepeater($this->document, $this->handler, $this, $times);
Expand Down
2 changes: 1 addition & 1 deletion source/FluidXml/FluidInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function html($strip = false);
public function save($file, $strip = false);
public function query(...$query);
public function __invoke(...$query);
public function times($times, callable $fn = null);
public function times($times, ?callable $fn = null);
public function each(callable $fn);
public function map(callable $fn);
public function filter(callable $fn);
Expand Down
2 changes: 1 addition & 1 deletion source/FluidXml/FluidXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function namespace_(...$arguments): static
}

public function query(...$query) { return $this->context()->query(...$query); }
public function times($times, callable $fn = null) { return $this->context()->times($times, $fn); }
public function times($times, ?callable $fn = null) { return $this->context()->times($times, $fn); }
public function each(callable $fn) { return $this->context()->each($fn); }
public function map(callable $fn) { return $this->context()->map($fn); }
public function filter(callable $fn) { return $this->context()->filter($fn); }
Expand Down