[PR #1026] [MERGED] Remove some redundant clauses #9053

Closed
opened 2026-01-22 16:02:59 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1026
Author: @flack
Created: 5/2/2014
Status: Merged
Merged: 5/2/2014
Merged by: @Ocramius

Base: masterHead: patch-5


📝 Commits (1)

  • 5cf906d Remove some redundant clauses

📊 Changes

1 file changed (+3 additions, -9 deletions)

View changed files

📝 lib/Doctrine/ORM/UnitOfWork.php (+3 -9)

📄 Description

The objectmanager insertion logic was identical in the if and else clauses, so I replaced both occurences with one directly after the else block closes. It is semantically identical but a little more readable, especially since the method has more than 250 lines (and a cyclomatic complexity of 100 or so :-)) as it is.


🔄 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/doctrine/orm/pull/1026 **Author:** [@flack](https://github.com/flack) **Created:** 5/2/2014 **Status:** ✅ Merged **Merged:** 5/2/2014 **Merged by:** [@Ocramius](https://github.com/Ocramius) **Base:** `master` ← **Head:** `patch-5` --- ### 📝 Commits (1) - [`5cf906d`](https://github.com/doctrine/orm/commit/5cf906d76b6ca3baf166a6eda4efcaea7b1a2fa9) Remove some redundant clauses ### 📊 Changes **1 file changed** (+3 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/UnitOfWork.php` (+3 -9) </details> ### 📄 Description The objectmanager insertion logic was identical in the if and else clauses, so I replaced both occurences with one directly after the else block closes. It is semantically identical but a little more readable, especially since the method has more than 250 lines (and a cyclomatic complexity of 100 or so :-)) as it is. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:02:59 +01:00
admin closed this issue 2026-01-22 16:03:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9053