mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Switches instead of normal ifs and elseifs #6018
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?
Originally created by @ZielonyBuszmen on GitHub (Jul 16, 2018).
Originally assigned to: @ostrolucky on GitHub.
Support Question
I have small question about code and architecture.
In source code I found odd switches like that: https://github.com/doctrine/doctrine2/blob/2.5/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php#L399
In newer version on master (3.0) there are similar occurences of switch, but a bit more civilized. Example:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php#L1533
Why do you use that tricky code? Is it faster than normal if()..elseif()?
@ostrolucky commented on GitHub (Aug 5, 2018):
I'm sorry but I have to close this, as this is not an actual issue. Drop the question in one of our community channels.
@Ocramius commented on GitHub (Aug 5, 2018):
I think this was just a leftover - already fixed in
masterIIRC