[PR #548] [MERGED] Removed a small code duplication, and added Logger::toMonologLevel() tests. #1222

Closed
opened 2026-03-04 03:07:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Seldaek/monolog/pull/548
Author: @breda
Created: 4/25/2015
Status: Merged
Merged: 4/30/2015
Merged by: @Seldaek

Base: masterHead: master


📝 Commits (1)

  • 2cb4a57 Removed Logger::toMonologLevel() code duplication and added relevant tests

📊 Changes

2 files changed (+17 additions, -4 deletions)

View changed files

📝 src/Monolog/Logger.php (+2 -4)
📝 tests/Monolog/LoggerTest.php (+15 -0)

📄 Description

This is a rather small change, but keeping things DRY is always a good thing.
I removed the duplicated logic and replaced it with a Monolog\Logger::toMonologLevel() call.
Plus added the tests that cover that method.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Seldaek/monolog/pull/548 **Author:** [@breda](https://github.com/breda) **Created:** 4/25/2015 **Status:** ✅ Merged **Merged:** 4/30/2015 **Merged by:** [@Seldaek](https://github.com/Seldaek) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`2cb4a57`](https://github.com/Seldaek/monolog/commit/2cb4a574909e0dcc24115c2a9f873c3039cd0086) Removed Logger::toMonologLevel() code duplication and added relevant tests ### 📊 Changes **2 files changed** (+17 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/Monolog/Logger.php` (+2 -4) 📝 `tests/Monolog/LoggerTest.php` (+15 -0) </details> ### 📄 Description This is a rather small change, but keeping things DRY is always a good thing. I removed the duplicated logic and replaced it with a `Monolog\Logger::toMonologLevel()` call. Plus added the tests that cover that method. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 03:07:01 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#1222
No description provided.