Remove trailing whitespaces and fix brace locations
This commit is contained in:
parent
f13f44a2fc
commit
353ba4dfd1
@ -1833,7 +1833,8 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
* Sets definition
|
||||
* @param array $definition
|
||||
*/
|
||||
public function setCustomGeneratorDefinition(array $definition) {
|
||||
public function setCustomGeneratorDefinition(array $definition)
|
||||
{
|
||||
$this->customGeneratorDefinition = $definition;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,8 @@ namespace Doctrine\ORM\Mapping;
|
||||
* @Annotation
|
||||
* @Target("PROPERTY")
|
||||
*/
|
||||
final class CustomIdGenerator implements Annotation {
|
||||
final class CustomIdGenerator implements Annotation
|
||||
{
|
||||
/** @var string */
|
||||
public $class;
|
||||
/** @var array */
|
||||
|
@ -48,7 +48,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->assertEquals(ClassMetadata::GENERATOR_TYPE_SEQUENCE, $cm1->generatorType);
|
||||
}
|
||||
|
||||
public function testGetMetadataFor_ReturnsLoadedCustomIdGenerator() {
|
||||
public function testGetMetadataFor_ReturnsLoadedCustomIdGenerator()
|
||||
{
|
||||
$cm1 = $this->_createValidClassMetadata();
|
||||
$cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
|
||||
$cm1->customGeneratorDefinition = array(
|
||||
@ -64,7 +65,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
$actual->idGenerator);
|
||||
}
|
||||
|
||||
public function testGetMetadataFor_PasesArgumentsToGeneratorsConstructor() {
|
||||
public function testGetMetadataFor_PasesArgumentsToGeneratorsConstructor()
|
||||
{
|
||||
$cm1 = $this->_createValidClassMetadata();
|
||||
$cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
|
||||
$cm1->customGeneratorDefinition = array(
|
||||
@ -81,7 +83,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->assertEquals($expected, $actual->idGenerator);
|
||||
}
|
||||
|
||||
public function testGetMetadataFor_ThrowsExceptionOnUnknownCustomGeneratorClass() {
|
||||
public function testGetMetadataFor_ThrowsExceptionOnUnknownCustomGeneratorClass()
|
||||
{
|
||||
$cm1 = $this->_createValidClassMetadata();
|
||||
$cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
|
||||
$cm1->customGeneratorDefinition = array("class" => "NotExistingGenerator");
|
||||
@ -92,7 +95,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
$actual = $cmf->getMetadataFor($cm1->name);
|
||||
}
|
||||
|
||||
public function testGetMetadataFor_ThrowsExceptionOnMissingCustomGeneratorDefinition() {
|
||||
public function testGetMetadataFor_ThrowsExceptionOnMissingCustomGeneratorDefinition()
|
||||
{
|
||||
$cm1 = $this->_createValidClassMetadata();
|
||||
$cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
|
||||
$cmf = $this->_createTestFactory();
|
||||
@ -183,7 +187,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @return ClassMetadataFactoryTestSubject
|
||||
*/
|
||||
protected function _createTestFactory() {
|
||||
protected function _createTestFactory()
|
||||
{
|
||||
$mockDriver = new MetadataDriverMock();
|
||||
$entityManager = $this->_createEntityManager($mockDriver);
|
||||
$cmf = new ClassMetadataFactoryTestSubject();
|
||||
@ -195,7 +200,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
* @param string $class
|
||||
* @return ClassMetadata
|
||||
*/
|
||||
protected function _createValidClassMetadata() {
|
||||
protected function _createValidClassMetadata()
|
||||
{
|
||||
$cm1 = new ClassMetadata('Doctrine\Tests\ORM\Mapping\TestEntity1');
|
||||
$cm1->setPrimaryTable(array('name' => '`group`'));
|
||||
// Add a mapped field
|
||||
@ -250,10 +256,14 @@ class TestEntity1
|
||||
private $association;
|
||||
}
|
||||
|
||||
class CustomIdGenerator extends \Doctrine\ORM\Id\AbstractIdGenerator {
|
||||
class CustomIdGenerator extends \Doctrine\ORM\Id\AbstractIdGenerator
|
||||
{
|
||||
public $parameter;
|
||||
public function __construct($parameter = null) {
|
||||
public function __construct($parameter = null)
|
||||
{
|
||||
$this->parameter = $parameter;
|
||||
}
|
||||
public function generate(\Doctrine\ORM\EntityManager $em, $entity) {}
|
||||
public function generate(\Doctrine\ORM\EntityManager $em, $entity)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user