Skip to content

Refactoring: replace Logger::validateLevel() to Logger::assert*#104

Merged
vjik merged 9 commits intomasterfrom
cleanup
Jun 7, 2024
Merged

Refactoring: replace Logger::validateLevel() to Logger::assert*#104
vjik merged 9 commits intomasterfrom
cleanup

Conversation

@vjik
Copy link
Copy Markdown
Member

@vjik vjik commented Jun 6, 2024

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

@vjik vjik changed the title Refactoring: replace Logger::validateLevel() to Logger::assert* Refactoring: replace Logger::validateLevel() to Logger::assert* Jun 6, 2024
@vjik vjik marked this pull request as ready for review June 6, 2024 12:20
@vjik vjik added the status:code review The pull request needs review. label Jun 6, 2024
@vjik vjik requested a review from a team June 6, 2024 12:20
Comment thread src/Logger.php
*/
public function log(mixed $level, string|Stringable $message, array $context = []): void
{
self::assertLevelIsString($level);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it's public I think it's better to call isValid method as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not need, because level will be to check in Message constructor further.

@vjik vjik merged commit 46306d9 into master Jun 7, 2024
@vjik vjik deleted the cleanup branch June 7, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants