w3lifer/php-response-interface

1.0.1 2025-01-31 23:56 UTC

This package is auto-updated.

Last update: 2025-01-31 23:57:45 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