uptodown/equalable

An interface for checking equal objects

Installs: 16 015

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Forks: 0

v1.0.1 2017-11-30 13:43 UTC

This package is auto-updated.

Last update: 2024-04-29 02:21:47 UTC


README

An interface for checking equal objects

Packagist MIT License

Installation

To install it with composer:

composer require uptodown/equalable

Simple usage

The object:

use Uptodown\EqualableInterface\Equalable;

class NewObject implements Equalable
{
    public function equals($object)
    {
        return /* equal condition */;
    }
}

The usage:

if ($newObject->equals($otherNewObject)) {
    // do something
}