Browse Source

Merge pull request #24 from mweimerskirch/patch-1

Fix merge error
Bernhard Schussek 14 years ago
parent
commit
961dfd3767

+ 0 - 35
src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php

@@ -64,8 +64,6 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
     }
 
     /**
-<<<<<<< HEAD
-=======
      * @inheritDoc
      */
     public function guessMinLength($class, $property)
@@ -78,39 +76,6 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
     }
 
     /**
-     * Iterates over the constraints of a property, executes a constraints on
-     * them and returns the best guess
-     *
-     * @param string $class       The class to read the constraints from
-     * @param string $property    The property for which to find constraints
-     * @param \Closure $guessForConstraint   The closure that returns a guess
-     *                            for a given constraint
-     * @return Guess  The guessed value with the highest confidence
-     */
-    protected function guess($class, $property, \Closure $guessForConstraint)
-    {
-        $guesses = array();
-        $classMetadata = $this->metadataFactory->getClassMetadata($class);
-
-        if ($classMetadata->hasMemberMetadatas($property)) {
-            $memberMetadatas = $classMetadata->getMemberMetadatas($property);
-
-            foreach ($memberMetadatas as $memberMetadata) {
-                $constraints = $memberMetadata->getConstraints();
-
-                foreach ($constraints as $constraint) {
-                    if ($guess = $guessForConstraint($constraint)) {
-                        $guesses[] = $guess;
-                    }
-                }
-            }
-        }
-
-        return Guess::getBestGuess($guesses);
-    }
-
-    /**
->>>>>>> mweimerskirch/form_pattern_attribute
      * Guesses a field class name for a given constraint
      *
      * @param  Constraint $constraint  The constraint to guess for