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

1.0.3 2025-02-09 18:47 UTC

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