Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent 558b315 commit 657044e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
],
"require": {
"php": ">=8.1",
"spiral/core": "^3.15",
"spiral/files": "^3.15",
"spiral/core": "^3.14.8",
"spiral/files": "^3.14.8",
"psr/event-dispatcher": "^1.0"
},
"require-dev": {
"spiral/boot": "^3.15",
"spiral/boot": "^3.14.8",
"phpunit/phpunit": "^10.1",
"mockery/mockery": "^1.5",
"vimeo/psalm": "^5.9"
Expand Down
2 changes: 1 addition & 1 deletion src/Context/ValueDependency.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class ValueDependency implements DependencyInterface
public function __construct(
private readonly string $name,
private readonly mixed $value,
array $variants = null
?array $variants = null
) {
$this->variants = $variants ?? [$value];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/CompileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CompileException extends EngineException
{
private array $userTrace = [];

public function __construct(\Throwable $previous = null)
public function __construct(?\Throwable $previous = null)
{
parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous);

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RenderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class RenderException extends ViewException
{
private array $userTrace = [];

public function __construct(\Throwable $previous = null)
public function __construct(?\Throwable $previous = null)
{
parent::__construct((string) $previous?->getMessage(), (int) ($previous?->getCode() ?? 0), $previous);
$this->file = (string) $previous?->getFile();
Expand Down
2 changes: 1 addition & 1 deletion src/LoaderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ public function load(string $path): ViewSource;
*
* @throws LoaderException
*/
public function list(string $namespace = null): array;
public function list(?string $namespace = null): array;
}
2 changes: 1 addition & 1 deletion src/Processor/ContextProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class ContextProcessor implements ProcessorInterface

private readonly string $pattern;

public function __construct(string $pattern = null)
public function __construct(?string $pattern = null)
{
$this->pattern = $pattern ?? self::PATTERN;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ViewCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class ViewCache
{
private array $cache = [];

public function reset(ContextInterface $context = null): void
public function reset(?ContextInterface $context = null): void
{
if (empty($context)) {
$this->cache = [];
Expand Down
6 changes: 3 additions & 3 deletions src/ViewLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class ViewLoader implements LoaderInterface

public function __construct(
private readonly array $namespaces,
FilesInterface $files = null,
?FilesInterface $files = null,
private readonly string $defaultNamespace = self::DEFAULT_NAMESPACE,
private readonly ?EventDispatcherInterface $dispatcher = null,
) {
Expand Down Expand Up @@ -50,7 +50,7 @@ public function getExtension(): ?string
* @psalm-assert-if-true non-empty-string $filename
* @psalm-assert-if-true ViewPath $parsed
*/
public function exists(string $path, string &$filename = null, ViewPath &$parsed = null): bool
public function exists(string $path, ?string &$filename = null, ?ViewPath &$parsed = null): bool
{
if (empty($this->parser)) {
throw new LoaderException('Unable to locate view source, no extension has been associated.');
Expand Down Expand Up @@ -92,7 +92,7 @@ public function load(string $path): ViewSource
);
}

public function list(string $namespace = null): array
public function list(?string $namespace = null): array
{
if (empty($this->parser)) {
throw new LoaderException('Unable to list view sources, no extension has been associated.');
Expand Down

0 comments on commit 657044e

Please sign in to comment.