mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1026] [MERGED] Remove some redundant clauses #9053
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:patch-5📝 Commits (1)
5cf906dRemove 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.