private function tryDecodeValueFromGetterType(
        ReflectionClass $reflectionClass,
        string $normalizedPropertyName,
        $encodedValue,
        EncodingContext $context,
        &$decodedValue
    ): bool {
        // Check if we can infer the type from any getters or setters
        foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
            if (
                !$reflectionMethod->hasReturnType() ||
                $reflectionMethod->getReturnType() === 'array' ||
                $reflectionMethod->isConstructor() ||
                $reflectionMethod->isDestructor() ||
                $reflectionMethod->getNumberOfRequiredParameters() > 0
            ) {
                continue;
            }

            $propertyName = null;

            // Try to extract the property name from the getter/has-er/is-er
            if (strpos($reflectionMethod->name, 'get') === 0 || strpos($reflectionMethod->name, 'has') === 0) {
                $propertyName = lcfirst(substr($reflectionMethod->name, 3));
            } elseif (strpos($reflectionMethod->name, 'is') === 0) {
                $propertyName = lcfirst(substr($reflectionMethod->name, 2));
            }

            if ($propertyName === null) {
                continue;
            }

            $encodedPropertyName = $this->normalizePropertyName($propertyName);

            // This getter matches the property name we're looking for
            if ($encodedPropertyName === $normalizedPropertyName) {
                try {
                    $reflectionMethodReturnType = (string)$reflectionMethod->getReturnType();
                    $decodedValue = $this->encoders->getEncoderForType($reflectionMethodReturnType)
                        ->decode($encodedValue, $reflectionMethodReturnType, $context);

                    return true;
                } catch (EncodingException $ex) {
                    return false;
                }
            }
        }

        return false;
    }