From 76f2ba50eb802cf62a1246d4731a195655abbed1 Mon Sep 17 00:00:00 2001 From: Benjamin Morel Date: Fri, 14 Dec 2012 18:55:16 +0000 Subject: [PATCH] Fixed documentation for Doctrine\Tests\DbalTypes --- .../Tests/DbalTypes/NegativeToPositiveType.php | 15 +++++++++++++++ .../Tests/DbalTypes/UpperCaseStringType.php | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/tests/Doctrine/Tests/DbalTypes/NegativeToPositiveType.php b/tests/Doctrine/Tests/DbalTypes/NegativeToPositiveType.php index ae704f8bd..8395b6acd 100644 --- a/tests/Doctrine/Tests/DbalTypes/NegativeToPositiveType.php +++ b/tests/Doctrine/Tests/DbalTypes/NegativeToPositiveType.php @@ -7,26 +7,41 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; class NegativeToPositiveType extends Type { + /** + * {@inheritdoc} + */ public function getName() { return 'negative_to_positive'; } + /** + * {@inheritdoc} + */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration); } + /** + * {@inheritdoc} + */ public function canRequireSQLConversion() { return true; } + /** + * {@inheritdoc} + */ public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) { return 'ABS(' . $sqlExpr . ')'; } + /** + * {@inheritdoc} + */ public function convertToPHPValueSQL($sqlExpr, $platform) { return '-(' . $sqlExpr . ')'; diff --git a/tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php b/tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php index 47e8c790d..3811aa00d 100644 --- a/tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php +++ b/tests/Doctrine/Tests/DbalTypes/UpperCaseStringType.php @@ -7,21 +7,33 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; class UpperCaseStringType extends StringType { + /** + * {@inheritdoc} + */ public function getName() { return 'upper_case_string'; } + /** + * {@inheritdoc} + */ public function canRequireSQLConversion() { return true; } + /** + * {@inheritdoc} + */ public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform) { return 'UPPER(' . $sqlExpr . ')'; } + /** + * {@inheritdoc} + */ public function convertToPHPValueSQL($sqlExpr, $platform) { return 'LOWER(' . $sqlExpr . ')';