You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to this page there are some very specific rules for service contracts. For example:
Valid object types include a fully qualified class name or a fully qualified interface name.
Any parameters or return values of type array can be denoted by following any of the previous types by an empty set of square brackets []
Wouldn't it make sense to have a sniff for these things?
Reason
I come across a lot of service contracts that don't include FQCN and/or have an array return type instead of FQCN[]. This goes against the rules set by Magento and might also break future (web api) implementations (due to reflection).
Implementation
Not sure at this moment how to implement this, but it seems to me that this can be done with a new sniff.
The text was updated successfully, but these errors were encountered:
Rule
According to this page there are some very specific rules for service contracts. For example:
Wouldn't it make sense to have a sniff for these things?
Reason
I come across a lot of service contracts that don't include FQCN and/or have an
array
return type instead ofFQCN[]
. This goes against the rules set by Magento and might also break future (web api) implementations (due to reflection).Implementation
Not sure at this moment how to implement this, but it seems to me that this can be done with a new sniff.
The text was updated successfully, but these errors were encountered: