protected function checkUniqueItems($entity, $schema, $entityName)
    {
        if (isset($schema->uniqueItems) && $schema->uniqueItems) {
            if (count(array_unique($entity)) != count($entity)) {
                throw new ValidationException(sprintf('All items in array [%s] must be unique', $entityName));
            }
        }

        return $this;
    }
protected function checkUniqueItems($entity, $schema, $entityName)
    {
        if (isset($schema->uniqueItems) && $schema->uniqueItems) {
            if (count(array_unique($entity)) != count($entity)) {
                throw new ValidationException(sprintf('All items in array [%s] must be unique', $entityName));
            }
        }

        return $this;
    }
protected function checkUniqueItems ( $ entity , $ schema , $ entityName ) { if ( isset ( $ schema -> uniqueItems ) && $ schema -> uniqueItems ) { if ( count ( array_unique ( $ entity ) ) != count ( $ entity ) ) { throw new ValidationException ( sprintf ( 'All items in array [%s] must be unique' , $ entityName ) ) ; } } return $ this ; }
Check array unique items

@param array $entity
@param object $schema
@param string $entityName

@return Validator
Check array unique items