<?php

namespace Lc\SovBundle\Component;

use Cocur\Slugify\Slugify;

class ArrayComponent
{
    public function contains(array $array, $entity): bool
    {
        foreach($array as $entityTest) {
            if(get_class($entityTest) == get_class($entity)
                && $entityTest->getId() == $entity->getId()) {
                return true;
            }
        }

        return false;
    }
}
