Open
Description
Rule
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.