-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomersimprovementImproves usability or overall DXImproves usability or overall DXperformanceDegrading or improving performanceDegrading or improving performance
Description
According to https://www.php.net/manual/en/function.assert.php, the assert keyword is, since PHP 7, a language construct, which is discarded in a production runtime and executed in a development scenario. There are multiple type checks for method arguments (for example for implementations of ArrayAccess), which also help improve static analysis. The same can be achieved with assertions while improving real-world performance, since they are not evaluated if the appropriate settings are in place.
Method Elephox\Collection\ObjectSet::add already implements the desired assertion style.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersimprovementImproves usability or overall DXImproves usability or overall DXperformanceDegrading or improving performanceDegrading or improving performance