Skip to content

otis22/php-interfaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
        ];
    }
}

About

php interfaces for my projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages