wol-soft/php-json-schema-model-generator-production

View on GitHub
src/Exception/Arrays/UniqueItemsException.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

declare(strict_types = 1);

namespace PHPModelGenerator\Exception\Arrays;

use PHPModelGenerator\Exception\ValidationException;

/**
 * Class UniqueItemsException
 *
 * @package PHPModelGenerator\Exception\Arrays
 */
class UniqueItemsException extends ValidationException
{
    /**
     * UniqueItemsException constructor.
     *
     * @param $providedValue
     * @param string $propertyName
     */
    public function __construct($providedValue, string $propertyName)
    {
        parent::__construct(
            "Items of array $propertyName are not unique",
            $propertyName,
            $providedValue
        );
    }
}