for some (recently updated?) methods in the Spryker core, there are return types specified.
While this generally is a good thing, it makes it hard to impossible to overwrite those methods with an extended interface as PHP does not allow to change the method’s signature.
public function createRestResourceBuilder(): RestResourceBuilderInterface
return new RestResourceBuilder();
On project level we cannot have a child of RestResourceBuilderInterface as new return type.
Sometimes it works to just specify a different return type in the annotations, but that leads to inconsistency which is criticized by the code sniffer.
Maybe it would make sense to not use return types in the core to keep the methods overwritable?