@@ -37,15 +37,15 @@ |
||
37 | 37 | |
38 | 38 | public static function enable() |
39 | 39 | { |
40 | - Field::macro(self::MACRO_METHOD, function (Field $builder) { |
|
40 | + Field::macro(self::MACRO_METHOD, function(Field $builder) { |
|
41 | 41 | return new static($builder->getClassMetadata(), $builder->getName()); |
42 | 42 | }); |
43 | 43 | |
44 | - ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) { |
|
44 | + ManyToOne::macro(self::MACRO_METHOD, function(ManyToOne $builder) { |
|
45 | 45 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
46 | 46 | }); |
47 | 47 | |
48 | - OneToOne::macro(self::MACRO_METHOD, function (OneToOne $builder) { |
|
48 | + OneToOne::macro(self::MACRO_METHOD, function(OneToOne $builder) { |
|
49 | 49 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
50 | 50 | }); |
51 | 51 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function map(Fluent $builder) |
24 | 24 | { |
25 | - $builder->integer('id')->unsigned()->primary()->generatedValue(function (GeneratedValue $builder) { |
|
25 | + $builder->integer('id')->unsigned()->primary()->generatedValue(function(GeneratedValue $builder) { |
|
26 | 26 | $builder->identity(); |
27 | 27 | }); |
28 | 28 | $builder->integer('depth'); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function map(Fluent $builder) |
24 | 24 | { |
25 | - $builder->integer('id')->unsigned()->primary()->generatedValue(function (GeneratedValue $builder) { |
|
25 | + $builder->integer('id')->unsigned()->primary()->generatedValue(function(GeneratedValue $builder) { |
|
26 | 26 | $builder->identity(); |
27 | 27 | }); |
28 | 28 | $builder->integer('depth'); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function map(Fluent $builder) |
24 | 24 | { |
25 | - $builder->integer('id')->unsigned()->primary()->generatedValue(function (GeneratedValue $builder) { |
|
25 | + $builder->integer('id')->unsigned()->primary()->generatedValue(function(GeneratedValue $builder) { |
|
26 | 26 | $builder->identity(); |
27 | 27 | }); |
28 | 28 | $builder->integer('depth'); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public static function enable() |
36 | 36 | { |
37 | - Builder::macro(self::MACRO_METHOD, function (Fluent $builder, callable $callback = null) { |
|
37 | + Builder::macro(self::MACRO_METHOD, function(Fluent $builder, callable $callback = null) { |
|
38 | 38 | $tree = new static($builder); |
39 | 39 | |
40 | 40 | if (is_callable($callback)) { |
@@ -76,13 +76,13 @@ |
||
76 | 76 | */ |
77 | 77 | protected static function addMacro($method, $key) |
78 | 78 | { |
79 | - Field::macro($method, function (Field $field) use ($key) { |
|
79 | + Field::macro($method, function(Field $field) use ($key) { |
|
80 | 80 | $field->nullable(); |
81 | 81 | |
82 | 82 | return new static($field->getClassMetadata(), $field->getName(), $key); |
83 | 83 | }); |
84 | 84 | |
85 | - ManyToOne::macro($method, function (ManyToOne $relation) use ($key) { |
|
85 | + ManyToOne::macro($method, function(ManyToOne $relation) use ($key) { |
|
86 | 86 | $relation->nullable(); |
87 | 87 | |
88 | 88 | return new static($relation->getClassMetadata(), $relation->getRelation(), $key); |
@@ -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 | } |
@@ -90,6 +90,6 @@ |
||
90 | 90 | { |
91 | 91 | $table = $this->builder->getClassMetadata()->getTableName(); |
92 | 92 | |
93 | - return $table . $this->separator . implode($this->separator, $this->getColumns()) . $this->separator . $this->suffix; |
|
93 | + return $table.$this->separator.implode($this->separator, $this->getColumns()).$this->separator.$this->suffix; |
|
94 | 94 | } |
95 | 95 | } |
@@ -161,7 +161,7 @@ |
||
161 | 161 | return $this->queueMacro($method, $params); |
162 | 162 | } |
163 | 163 | |
164 | - throw new InvalidArgumentException('Fluent builder method [' . $method . '] does not exist'); |
|
164 | + throw new InvalidArgumentException('Fluent builder method ['.$method.'] does not exist'); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |