diff --git a/CHANGELOG-2.1.md b/CHANGELOG-2.1.md index 8caeaacbb8..d8a512c747 100644 --- a/CHANGELOG-2.1.md +++ b/CHANGELOG-2.1.md @@ -207,6 +207,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c * added options "add_method" and "remove_method" to collection and choice type * forms now don't create an empty object anymore if they are completely empty and not required. The empty value for such forms is null. + * added constant Guess::VERY_HIGH_CONFIDENCE ### HttpFoundation diff --git a/src/Symfony/Component/Form/Guess/Guess.php b/src/Symfony/Component/Form/Guess/Guess.php index 24ab69ffc1..44d5f232be 100644 --- a/src/Symfony/Component/Form/Guess/Guess.php +++ b/src/Symfony/Component/Form/Guess/Guess.php @@ -22,6 +22,12 @@ namespace Symfony\Component\Form\Guess; */ abstract class Guess { + /** + * Marks an instance with a value that is extremely likely to be correct + * @var integer + */ + const VERY_HIGH_CONFIDENCE = 3; + /** * Marks an instance with a value that is very likely to be correct * @var integer @@ -45,6 +51,7 @@ abstract class Guess * @var array */ private static $confidences = array( + self::VERY_HIGH_CONFIDENCE, self::HIGH_CONFIDENCE, self::MEDIUM_CONFIDENCE, self::LOW_CONFIDENCE, @@ -53,7 +60,8 @@ abstract class Guess /** * The confidence about the correctness of the value * - * One of HIGH_CONFIDENCE, MEDIUM_CONFIDENCE and LOW_CONFIDENCE. + * One of VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE, MEDIUM_CONFIDENCE + * and LOW_CONFIDENCE. * * @var integer */ @@ -95,8 +103,8 @@ abstract class Guess /** * Returns the confidence that the guessed value is correct * - * @return integer One of the constants HIGH_CONFIDENCE, MEDIUM_CONFIDENCE - * and LOW_CONFIDENCE + * @return integer One of the constants VERY_HIGH_CONFIDENCE, + * HIGH_CONFIDENCE, MEDIUM_CONFIDENCE and LOW_CONFIDENCE */ public function getConfidence() {