src/Form/FormDataConstraintFinder.php
private function guessProperty(ClassMetadata $metadata, $element)
    {
        // Is it the element the actual property
        if ($metadata->hasPropertyMetadata($element)) {
            return $element;
        }

        // Is it a camelized property
        $camelized = $this->camelize($element);
        if ($metadata->hasPropertyMetadata($camelized)) {
            return $camelized;
        }

        return null;
    }
private function guessProperty(ClassMetadata $metadata, $element)
    {
        // Is it the element the actual property
        if ($metadata->hasPropertyMetadata($element)) {
            return $element;
        }

        // Is it a camelized property
        $camelized = $this->camelize($element);
        if ($metadata->hasPropertyMetadata($camelized)) {
            return $camelized;
        }

        return null;
    }
private function guessProperty ( ClassMetadata $ metadata , $ element ) { // Is it the element the actual property if ( $ metadata -> hasPropertyMetadata ( $ element ) ) { return $ element ; } // Is it a camelized property $ camelized = $ this -> camelize ( $ element ) ; if ( $ metadata -> hasPropertyMetadata ( $ camelized ) ) { return $ camelized ; } return null ; }
Guess what property a given element belongs to.

@param ClassMetadata $metadata
@param string $element
@return null|string
Guess what property a given element belongs to .