-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
So far, the text in the PHPDoc of ParameterDefinitionInterface says this:
Represents a container entry that is a scalar value.
Note: according to is_scalar doc, arrays are NOT "scalar" values.
In the unit tests, we have this: https://github.com/container-interop/definition-interop-tests/blob/master/src/AbstractDefinitionCompatibilityTest.php#L166-L176
Obviously, our parameter definitions is returning an array. Furthermore, the test adds references in the array, which are not scalar either.
I think the test is correct, but that means we need to work on the PHPDoc of the ParameterDefinitionInterface.
Shall we try something like this:
Represents a container entry that is a parameter.
A parameter is a scalar value, a reference, or an array of parameters:
PARAMETER = [scalar | ReferenceInterface | array<PARAMETER> ]
Also, since we are allowing ReferenceInterface into parameters, shall we not extend it to DefinitionInterface?
In this case, we would have:
PARAMETER = [scalar | DefinitionInterface | array<PARAMETER> ]
Metadata
Metadata
Assignees
Labels
No labels