otis22 / php-interfaces
Interfaces for OOP php projects
1.1.1
2021-02-07 19:00 UTC
Requires (Dev)
- phpstan/phpstan: ^0.12.19
- phpunit/phpunit: ^9.1
- squizlabs/php_codesniffer: 3.*
README
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' ]; } }