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

Fixed the latest rules PhpCsFixer #11

Merged
merged 1 commit into from
Jul 8, 2023
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/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class AbstractType
protected Parser $parser;
protected Formatter $formatter;

public function __construct(float|int|string|array $value = null, ?AbstractConfig $config = null)
public function __construct(float|int|string|array|null $value = null, ?AbstractConfig $config = null)
{
$this->prepareObject($value, $config);
}
Expand Down Expand Up @@ -655,7 +655,7 @@ protected function modifier(float $newValue, ?string $logMessage = null, bool $g
return $this;
}

private function prepareObject(float|int|string|array $value = null, ?AbstractConfig $config = null): void
private function prepareObject(float|int|string|array|null $value = null, ?AbstractConfig $config = null): void
{
// $this->type = Str::class \strtolower(\str_replace(__NAMESPACE__ . '\\', '', static::class));
$this->type = Str::getClassName(static::class, true) ?? 'UndefinedType';
Expand Down