guessPatternForConstraint example

        // 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(...));
    }

    /** * Guesses a field class name for a given constraint. */
    public function guessTypeForConstraint(Constraint $constraint): ?TypeGuess
    {
        switch ($constraint::class) {
            case Type::class:
                switch ($constraint->type) {
                    case 'array':
                        
Home | Imprint | This part of the site doesn't use cookies.