guessRequiredForConstraint example



    public function guessType(string $class, string $property): ?TypeGuess
    {
        return $this->guess($class$property$this->guessTypeForConstraint(...));
    }

    public function guessRequired(string $class, string $property): ?ValueGuess
    {
        // If we don't find any constraint telling otherwise, we can assume         // that a field is not required (with LOW_CONFIDENCE)         return $this->guess($class$property$this->guessRequiredForConstraint(...), false);
    }

    public function guessMaxLength(string $class, string $property): ?ValueGuess
    {
        return $this->guess($class$property$this->guessMaxLengthForConstraint(...));
    }

    public function guessPattern(string $class, string $property): ?ValueGuess
    {
        return $this->guess($class$property$this->guessPatternForConstraint(...));
    }

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