@@ -245,10 +245,10 @@ |
||
| 245 | 245 | /** |
| 246 | 246 | * Checks if $field type is valid as Sluggable field |
| 247 | 247 | * |
| 248 | - * @param object $meta |
|
| 248 | + * @param ExtensibleClassMetadata $meta |
|
| 249 | 249 | * @param string $field |
| 250 | 250 | * |
| 251 | - * @return bool |
|
| 251 | + * @return boolean|null |
|
| 252 | 252 | */ |
| 253 | 253 | protected function isValidField($meta, $field) |
| 254 | 254 | { |
@@ -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 | }); |