otis22 / php-interfaces
Interfaces for OOP php projects
Installs: 1 072
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
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' ]; } }