for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sonata\DoctrineORMAdminBundle\Tests\Fixtures\DoctrineType;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\StringType;
use Sonata\DoctrineORMAdminBundle\Tests\Fixtures\Util\NonIntegerIdentifierTestClass;
/**
* Mock for a custom doctrine type used in the ModelManagerTest suite
*
* @author Jeroen Thora <[email protected]>
*/
class UuidType extends StringType
{
const NAME = 'uuid';
public function getName()
return self::NAME;
}
* {@inheritDoc}
public function convertToPHPValue($value, AbstractPlatform $platform)
return !empty($value) ? new NonIntegerIdentifierTestClass($value) : null;
public function convertToDatabaseValue($value, AbstractPlatform $platform)
return $value->toString();