Multiple return values is not commonly used in PHP. It's really more of a Go idiom to use the last returned value as an error. So this would be more idiomatic and more verbose and thus easier to comprehend.
composer require dxw/result
i.e.
return \Dxw\Result\Result:ok($data);
return \Dxw\Result\Result::err($error);