w3lifer / php-response-interface
PHP Response Interface
Installs: 4
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/w3lifer/php-response-interface
Requires
- php: ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2025-09-30 13:40:27 UTC
README
Installation
composer require w3lifer/php-response-interface
Usage
PhpResponseInterface::getFalseResponse(); // ['success' => false, 'errors' => [] PhpResponseInterface::getFalseResponse(['Some error']); // ['success' => false, 'errors' => ['Some error']] PhpResponseInterface::getTrueResponse(); // ['success' => true, 'data' => []] PhpResponseInterface::getTrueResponse(['Some data']); // ['success' => true, 'data' => ['Some data']]
Tests
make tests