-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Problem
Some Expression classes in src/Expression/ForClasses/ accept multiple values via splat operator (string ...$args), while others use array.
This inconsistency was first noted by @hgraca in #403.
Classes using splat operator (6)
ExtendNotExtendResideInOneOfTheseNamespacesResideInOneOfTheseNamespacesExactlyNotResideInOneOfTheseNamespacesExactlyNotResideInTheseNamespaces
Classes already using array (3)
DependsOnlyOnTheseNamespacesNotDependsOnTheseNamespacesMatchOneOfTheseNames
Why this is a problem
The codebase is inconsistent: similar expressions use different conventions for accepting multiple values.
Beyond inconsistency, the splat operator also limits future evolution — since variadic parameters must always be last, it is impossible to add a second constructor parameter without a breaking change.
Proposed solution
Standardize all expressions to use array instead of the splat operator.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels