@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | $modelPath = config('contentful.generator.model'); |
25 | 25 | $namespace = config('contentful.namespace.model'); |
26 | 26 | |
27 | - foreach (glob($modelPath . '/*.php') as $file) { |
|
28 | - $modelClass = $namespace . str_replace( |
|
27 | + foreach (glob($modelPath.'/*.php') as $file) { |
|
28 | + $modelClass = $namespace.str_replace( |
|
29 | 29 | [$modelPath, '.php', '/'], |
30 | 30 | ['', '', '\\'], |
31 | 31 | $file |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | private function entryMapper(array $entry): ContentfulMapper |
113 | 113 | { |
114 | 114 | $mapperNamespace = config('contentful.namespace.mapper'); |
115 | - $mapperClass = $mapperNamespace . '\\' . studly_case($this->entryContentType($entry)) . 'Mapper'; |
|
115 | + $mapperClass = $mapperNamespace.'\\'.studly_case($this->entryContentType($entry)).'Mapper'; |
|
116 | 116 | |
117 | 117 | if (!class_exists($mapperClass)) { |
118 | - throw new Exception('Unknown mapper: ' . $mapperClass); |
|
118 | + throw new Exception('Unknown mapper: '.$mapperClass); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return new $mapperClass; |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | private function entryModel(array $entry): ContentfulModel |
132 | 132 | { |
133 | 133 | $namespace = config('contentful.namespace.model'); |
134 | - $modelClass = $namespace . '\\' . studly_case($this->entryContentType($entry)); |
|
134 | + $modelClass = $namespace.'\\'.studly_case($this->entryContentType($entry)); |
|
135 | 135 | |
136 | 136 | if (!class_exists($modelClass)) { |
137 | - throw new Exception('Unknown model: ' . $modelClass); |
|
137 | + throw new Exception('Unknown model: '.$modelClass); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return new $modelClass; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $order = 1; |
173 | 173 | foreach ($relationships as $relationship) { |
174 | 174 | if (!isset($relationship['id']) || !isset($relationship['type'])) { |
175 | - throw new Exception('Relationships malformed! (' . print_r($relationship, true) . ')'); |
|
175 | + throw new Exception('Relationships malformed! ('.print_r($relationship, true).')'); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | DB::table('entry_relationships')->insert([ |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | if (!isset($data['payload'])) { |
234 | - throw new Exception('Mapper for model ' . class_basename($model) . ' must set a "payload" key'); |
|
234 | + throw new Exception('Mapper for model '.class_basename($model).' must set a "payload" key'); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | $instance = $this->instanceQueryBuilder($model, $data)->first(); |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $indexed = []; |
79 | 79 | |
80 | - $locale = ! empty($locale) ? $locale : Locale::default(); |
|
80 | + $locale = !empty($locale) ? $locale : Locale::default(); |
|
81 | 81 | foreach ($data as $field => $value) { |
82 | 82 | $indexed[$field][$locale] = $value; |
83 | 83 | } |
@@ -42,5 +42,5 @@ |
||
42 | 42 | 'replace_host' => 'images.ctfassets.net', |
43 | 43 | ], |
44 | 44 | |
45 | - 'payload_fields_not_fallback' => explode(',',env('CONTENTFUL_PAYLOAD_FIELD_NOT_FALLBACK', '')) |
|
45 | + 'payload_fields_not_fallback' => explode(',', env('CONTENTFUL_PAYLOAD_FIELD_NOT_FALLBACK', '')) |
|
46 | 46 | ]; |
47 | 47 | \ No newline at end of file |