InvalidSyncOperationException example

throw new \InvalidArgumentException('Expected input to be non associative array.');
        }
    }

    /** * @throws InvalidSyncOperationException */
    private function validateSyncOperationInput(SyncOperation $operation): void
    {
        $errors = $operation->validate();
        if (\count($errors)) {
            throw new InvalidSyncOperationException(sprintf('Invalid sync operation. %s', implode(' ', $errors)));
        }
    }

    /** * @param array<mixed> $resolved */
    private function addReverseInheritedCommands(WriteCommandQueue $queue, EntityDefinition $definition, WriteContext $writeContext, array $resolved): void
    {
        if ($definition instanceof MappingEntityDefinition) {
            return;
        }
        
/** * @param string[] $fails */
    public static function expectationFailed(array $fails): ShopwareHttpException
    {
        return new ExpectationFailedException($fails);
    }

    public static function invalidSyncOperation(string $message): ShopwareHttpException
    {
        return new InvalidSyncOperationException($message);
    }

    public static function invalidSalesChannelId(string $salesChannelId): ShopwareHttpException
    {
        return new InvalidSalesChannelIdException($salesChannelId);
    }

    public static function invalidVersionName(): ShopwareHttpException
    {
        return new InvalidVersionNameException();
    }

    
Home | Imprint | This part of the site doesn't use cookies.