a naming convention about response code
composer require strever/resp-code
\Strever\Util\Resp::success(['id' => 1]);
\Strever\Util\Resp::fail(404);
\Strever\Util\Resp::notFound();
- fail
- failWithJson
- notFound
- invalidParams
- success
- successWithJson ...
$ phpunit tests/Util/RespTest.php
MIT