@@ -55,7 +55,7 @@ |
||
55 | 55 | * Gets the names of all mapped classes known to this driver. |
56 | 56 | * |
57 | 57 | * @throws MappingException |
58 | - * @return string[] The names of all mapped classes known to this driver. |
|
58 | + * @return integer[] The names of all mapped classes known to this driver. |
|
59 | 59 | */ |
60 | 60 | public function getAllClassNames() |
61 | 61 | { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function __construct(array $mappings = []) |
32 | 32 | { |
33 | - $this->fluentFactory = function (ClassMetadata $metadata) { |
|
33 | + $this->fluentFactory = function(ClassMetadata $metadata) { |
|
34 | 34 | return new Builder(new ClassMetadataBuilder($metadata)); |
35 | 35 | }; |
36 | 36 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function isTransient($className) |
74 | 74 | { |
75 | 75 | return |
76 | - ! $this->mappers->hasMapperFor($className) || |
|
76 | + !$this->mappers->hasMapperFor($className) || |
|
77 | 77 | $this->mappers->getMapperFor($className)->isTransient(); |
78 | 78 | } |
79 | 79 |
@@ -34,10 +34,10 @@ |
||
34 | 34 | protected static function getFactories() |
35 | 35 | { |
36 | 36 | return [ |
37 | - AttributeOverride::class => function (ClassMetadata $meta, $name) { |
|
37 | + AttributeOverride::class => function(ClassMetadata $meta, $name) { |
|
38 | 38 | return $meta->hasField($name); |
39 | 39 | }, |
40 | - AssociationOverride::class => function (ClassMetadata $meta, $name) { |
|
40 | + AssociationOverride::class => function(ClassMetadata $meta, $name) { |
|
41 | 41 | return $meta->hasAssociation($name); |
42 | 42 | }, |
43 | 43 | ]; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function readExtendedMetadata($meta, array &$config) |
33 | 33 | { |
34 | - if (! $meta instanceof ExtensibleClassMetadata) { |
|
34 | + if (!$meta instanceof ExtensibleClassMetadata) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 |
@@ -18,11 +18,11 @@ |
||
18 | 18 | */ |
19 | 19 | public static function enable() |
20 | 20 | { |
21 | - Field::macro(self::MACRO_METHOD, function (Field $builder) { |
|
21 | + Field::macro(self::MACRO_METHOD, function(Field $builder) { |
|
22 | 22 | return new static($builder->getClassMetadata(), $builder->getName()); |
23 | 23 | }); |
24 | 24 | |
25 | - ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) { |
|
25 | + ManyToOne::macro(self::MACRO_METHOD, function(ManyToOne $builder) { |
|
26 | 26 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
27 | 27 | }); |
28 | 28 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public static function enable() |
17 | 17 | { |
18 | - Field::macro(static::MACRO_METHOD, function (Field $builder) { |
|
18 | + Field::macro(static::MACRO_METHOD, function(Field $builder) { |
|
19 | 19 | return new static($builder->getClassMetadata(), $builder->getName()); |
20 | 20 | }); |
21 | 21 | } |
@@ -112,7 +112,7 @@ |
||
112 | 112 | */ |
113 | 113 | public static function enable() |
114 | 114 | { |
115 | - Field::macro(static::MACRO_METHOD, function (Field $builder, $fields) { |
|
115 | + Field::macro(static::MACRO_METHOD, function(Field $builder, $fields) { |
|
116 | 116 | return new static($builder->getClassMetadata(), $builder->getName(), $fields); |
117 | 117 | }); |
118 | 118 | } |
@@ -68,14 +68,14 @@ |
||
68 | 68 | */ |
69 | 69 | public static function enable() |
70 | 70 | { |
71 | - Builder::macro(static::MACRO_METHOD, function (Builder $builder, $fieldName = 'deletedAt', $type = 'dateTime') { |
|
71 | + Builder::macro(static::MACRO_METHOD, function(Builder $builder, $fieldName = 'deletedAt', $type = 'dateTime') { |
|
72 | 72 | |
73 | 73 | $builder->{$type}($fieldName)->nullable(); |
74 | 74 | |
75 | 75 | return new static($builder->getClassMetadata(), $fieldName); |
76 | 76 | }); |
77 | 77 | |
78 | - Field::macro(static::MACRO_METHOD, function (Field $builder) { |
|
78 | + Field::macro(static::MACRO_METHOD, function(Field $builder) { |
|
79 | 79 | return new static($builder->getClassMetadata(), $builder->getName()); |
80 | 80 | }); |
81 | 81 | } |
@@ -19,11 +19,11 @@ |
||
19 | 19 | */ |
20 | 20 | public static function enable() |
21 | 21 | { |
22 | - Field::macro(self::MACRO_METHOD, function (Field $builder) { |
|
22 | + Field::macro(self::MACRO_METHOD, function(Field $builder) { |
|
23 | 23 | return new static($builder->getClassMetadata(), $builder->getName()); |
24 | 24 | }); |
25 | 25 | |
26 | - Builder::macro('timestamps', function (Fluent $builder, $createdAt = 'createdAt', $updatedAt = 'updatedAt', $type = 'dateTime') { |
|
26 | + Builder::macro('timestamps', function(Fluent $builder, $createdAt = 'createdAt', $updatedAt = 'updatedAt', $type = 'dateTime') { |
|
27 | 27 | $builder->{$type}($createdAt)->timestampable()->onCreate(); |
28 | 28 | $builder->{$type}($updatedAt)->timestampable()->onUpdate(); |
29 | 29 | }); |
@@ -73,15 +73,15 @@ |
||
73 | 73 | */ |
74 | 74 | public static function enable() |
75 | 75 | { |
76 | - Field::macro(static::MACRO_METHOD, function (Field $builder) { |
|
76 | + Field::macro(static::MACRO_METHOD, function(Field $builder) { |
|
77 | 77 | return new static($builder->getClassMetadata(), $builder->getName()); |
78 | 78 | }); |
79 | 79 | |
80 | - Field::macro('locale', function (Field $field) { |
|
80 | + Field::macro('locale', function(Field $field) { |
|
81 | 81 | self::locale($field->getName()); |
82 | 82 | }); |
83 | 83 | |
84 | - Entity::macro('translationClass', function (Entity $entity, $class) { |
|
84 | + Entity::macro('translationClass', function(Entity $entity, $class) { |
|
85 | 85 | self::translationClass($class); |
86 | 86 | }); |
87 | 87 | } |