<?php interface MyInterface { public function doSomethingAndGetNextStep(): ?MyInterface; } class MyService implements MyInterface { public function doSomethingAndGetNextStep(): null { // do something here, like all other implementations // final one in chain return null; } } $a = new MyService(); var_dump($a->doSomethingAndGetNextStep());
You have javascript disabled. You will not be able to edit any code.