for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
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 Jorge Garces <[email protected]>
final class UuidBinaryType extends StringType
{
const NAME = 'uuid_binary';
* {@inheritdoc}
public function getName()
return self::NAME;
}
public function convertToPHPValue($value, AbstractPlatform $platform)
return !empty($value) ? new NonIntegerIdentifierTestClass($value->toString()) : null;
public function convertToDatabaseValue($value, AbstractPlatform $platform)
return $value->toString();