Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Version implements JsonSerializable

protected static ?Comparator $comparator = null;

final protected function __construct(int $major, int $minor, int $patch, PreRelease $preRelease = null, Build $build = null)
final protected function __construct(int $major, int $minor, int $patch, ?PreRelease $preRelease = null, ?Build $build = null)
{
VersionAssert::that($major)->greaterOrEqualThan(0, 'Major version must be positive integer');
VersionAssert::that($minor)->greaterOrEqualThan(0, 'Minor version must be positive integer');
Expand All @@ -44,7 +44,7 @@ final protected function __construct(int $major, int $minor, int $patch, PreRele
$this->build = $build;
}

public static function from(int $major, int $minor = 0, int $patch = 0, PreRelease $preRelease = null, Build $build = null): Version
public static function from(int $major, int $minor = 0, int $patch = 0, ?PreRelease $preRelease = null, ?Build $build = null): Version
{
return new static($major, $minor, $patch, $preRelease, $build);
}
Expand Down
Loading