final protected function checkParameterType($value): void
    {
        if (\is_array($value)) {
            foreach ($value as $val) {
                $this->checkParameterType($val);
            }
        } elseif ($value !== null && !\is_scalar($value)) {
            throw new InvalidScalarParameterException(\sprintf(
                'Class %s can only accept scalar payload parameters, %s given',
                self::class,
                \is_object($value) ? \get_class($value) : \gettype($value)
            ));
        }
    }