otis22/php-interfaces

Interfaces for OOP php projects

Installs: 1 137

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/otis22/php-interfaces

1.1.1 2021-02-07 19:00 UTC

This package is auto-updated.

Last update: 2025-10-08 04:43:04 UTC


README

GitHub CI

php-interfaces

php interfaces for OOP projects

Installation

composer require otis22/php-interfaces

KeyValue Interface

Interface for objects which can be convert to simple assoc array key => value

<?php

declare(strict_types=1);

use Otis22\PhpInterfaces\KeyValue;

final class FakeLoginCredentials implements KeyValue
{
    public function asKeyValue(): array
    {
        return [
            'login' => 'test'
        ];
    }
}