src/Invoice/Validator/Constraints/SupplierAndCustomerNotBlank.php line 38
<?phpdeclare(strict_types=1);/*** Copyright (c) 2022 TECLA Consulting Group oü.* All rights reserved.** This unpublished material is proprietary to TECLA Consulting Group oü.* All rights reserved. The methods and* techniques described herein are considered trade secrets* and/or confidential. Reproduction or distribution, in whole* or in part, is forbidden except by express written permission* of TECLA Consulting Group oü.** @author Matúš Sýkorjak <matus@tecla.no>* @copyright 2022 TECLA Consulting Group oü*/namespace App\Invoice\Validator\Constraints;use Symfony\Component\Validator\Constraint;use Symfony\Component\Validator\Exception\MissingOptionsException;final class SupplierAndCustomerNotBlank extends Constraint{public const IS_BLANK_SUPPLIER_AND_CUSTOMER_ERROR = 'ef4aeb12-8851-4721-a3db-8eabd8a9f575';public string $message = 'Supplier and customer should not be empty.';public ?string $supplierPropertyPath = null;public ?string $customerPropertyPath = null;protected static $errorNames = [self::IS_BLANK_SUPPLIER_AND_CUSTOMER_ERROR => 'IS_BLANK_SUPPLIER_AND_CUSTOMER_ERROR',];public function __construct(array $options = null,?array $groups = null,mixed $payload = null,?string $message = null,?string $supplierPropertyPath = null,?string $customerPropertyPath = null) {parent::__construct($options ?? [], $groups, $payload);$this->message = $message ?? $this->message;$this->supplierPropertyPath = $supplierPropertyPath ?? $this->supplierPropertyPath;$this->customerPropertyPath = $customerPropertyPath ?? $this->customerPropertyPath;if (null === $this->supplierPropertyPath) {throw new MissingOptionsException(sprintf('Option "supplierPropertyPath" must be given for constraint "%s".', __CLASS__), ['supplierPropertyPath']);}if (null === $this->customerPropertyPath) {throw new MissingOptionsException(sprintf('Option "customerPropertyPath" must be given for constraint "%s".', __CLASS__), ['customerPropertyPath']);}}public function getTargets(): array|string{return self::CLASS_CONSTRAINT;}}