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

Update DateTime.php #28

Merged
merged 3 commits into from
May 21, 2023
Merged

Update DateTime.php #28

merged 3 commits into from
May 21, 2023

Conversation

dedalx
Copy link
Contributor

@dedalx dedalx commented May 18, 2023

Added type for PHP8 support (fix PHP8 Deprecated error)

Added type for PHP8 support (fix PHP8 Deprecated error)
src/DTO/DateTime.php Outdated Show resolved Hide resolved
@shoman4eg
Copy link
Owner

shoman4eg commented May 18, 2023

в composer json минимальная версия php 7.4, а там не было mixed.
думаю что будет лучше написать тип string вместо mixed

@dedalx
Copy link
Contributor Author

dedalx commented May 18, 2023

Ну поправить стоит в любом случае, так как на PHP 8 (проверял на 8.2) вылетает Warning (в Warning написано что стоит указать mixed видимо как у наследуемого класса).

@shoman4eg
Copy link
Owner

shoman4eg commented May 18, 2023

В данном случае, если не повышать версию php, проще будет добавить тип string
Если получится поправить, буду благодарен.

Change mixed to string
@@ -15,7 +15,7 @@ public function __construct(\DateTimeInterface $dateTime)
$this->dateTime = $dateTime;
}

public function jsonSerialize()
public function jsonSerialize():string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут код стайл, пробел после двоеточего

Code style fix
@shoman4eg shoman4eg merged commit d0abac6 into shoman4eg:master May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants