@@ -77,7 +77,7 @@ |
||
77 | 77 | $field = $field ?: $fieldBuilder; |
78 | 78 | |
79 | 79 | if (!$field instanceof Field) { |
80 | - throw new InvalidArgumentException("The callback should return an instance of " . Field::class); |
|
80 | + throw new InvalidArgumentException("The callback should return an instance of ".Field::class); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | $field->build(); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $association = $association ?: $associationBuilder; |
93 | 93 | |
94 | 94 | if (!$association instanceof Relation) { |
95 | - throw new InvalidArgumentException("The callback should return an instance of " . Relation::class); |
|
95 | + throw new InvalidArgumentException("The callback should return an instance of ".Relation::class); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $association->build(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | - throw new InvalidArgumentException('No attribute or association could be found for ' . $name); |
|
28 | + throw new InvalidArgumentException('No attribute or association could be found for '.$name); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -34,10 +34,10 @@ discard block |
||
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 | ]; |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | public function cascade(array $cascade) |
87 | 87 | { |
88 | 88 | foreach ($cascade as $name) { |
89 | - $method = 'cascade' . Inflector::classify(strtolower($name)); |
|
89 | + $method = 'cascade'.Inflector::classify(strtolower($name)); |
|
90 | 90 | |
91 | 91 | if (!method_exists($this->association, $method)) { |
92 | - throw new InvalidArgumentException('Cascade [' . $name . '] does not exist'); |
|
92 | + throw new InvalidArgumentException('Cascade ['.$name.'] does not exist'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $this->{$method}(); |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function fetch($strategy) |
107 | 107 | { |
108 | - $method = 'fetch' . Inflector::classify(strtolower($strategy)); |
|
108 | + $method = 'fetch'.Inflector::classify(strtolower($strategy)); |
|
109 | 109 | |
110 | 110 | if (!method_exists($this->association, $method)) { |
111 | - throw new InvalidArgumentException('Fetch [' . $strategy . '] does not exist'); |
|
111 | + throw new InvalidArgumentException('Fetch ['.$strategy.'] does not exist'); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | $this->{$method}(); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | { |
122 | 122 | if (!in_array($usage, $usages)) { |
123 | 123 | throw new InvalidArgumentException( |
124 | - '[' . $usage . '] is not a valid cache usage. Available: ' . implode(', ', array_keys($this->usages)) |
|
124 | + '['.$usage.'] is not a valid cache usage. Available: '.implode(', ', array_keys($this->usages)) |
|
125 | 125 | ); |
126 | 126 | } |
127 | 127 |
@@ -35,9 +35,9 @@ |
||
35 | 35 | { |
36 | 36 | if (!$this->hasMapperFor($className)) { |
37 | 37 | throw new MappingException(sprintf( |
38 | - "Class [%s] does not have a mapping configuration. " . |
|
39 | - "Make sure you create a Mapping class that extends either %s, %s or %s. " . |
|
40 | - "If you are using inheritance mapping, remember to create mappings " . |
|
38 | + "Class [%s] does not have a mapping configuration. ". |
|
39 | + "Make sure you create a Mapping class that extends either %s, %s or %s. ". |
|
40 | + "If you are using inheritance mapping, remember to create mappings ". |
|
41 | 41 | "for every child of the inheritance tree.", |
42 | 42 | $className, |
43 | 43 | EntityMapping::class, |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public static function enable() |
55 | 55 | { |
56 | 56 | foreach (self::$validTypes as $type) { |
57 | - Field::macro("asFile$type", function (Field $builder) use ($type) { |
|
57 | + Field::macro("asFile$type", function(Field $builder) use ($type) { |
|
58 | 58 | return new static($builder->getClassMetadata(), $builder->getName(), $type); |
59 | 59 | }); |
60 | 60 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | if (!in_array($type, self::$validTypes)) { |
83 | 83 | throw new InvalidMappingException( |
84 | - 'Invalid uploadable field type reference. Must be one of: ' . implode(', ', self::$validTypes) |
|
84 | + 'Invalid uploadable field type reference. Must be one of: '.implode(', ', self::$validTypes) |
|
85 | 85 | ); |
86 | 86 | } |
87 | 87 | } |
@@ -68,6 +68,6 @@ |
||
68 | 68 | return $this->queueMacro($method, $params); |
69 | 69 | } |
70 | 70 | |
71 | - throw new \InvalidArgumentException('Fluent builder method [' . $method . '] does not exist'); |
|
71 | + throw new \InvalidArgumentException('Fluent builder method ['.$method.'] does not exist'); |
|
72 | 72 | } |
73 | 73 | } |