@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | 'fm' => config('contentful.image.use_webp') ? $format : null, |
| 41 | 41 | 'fl' => static::detectProgressive($format, $useProgressive) ? 'progressive' : null, |
| 42 | 42 | 'fit' => static::detectFit($fit), |
| 43 | - ])->filter(function ($value) { |
|
| 43 | + ])->filter(function($value) { |
|
| 44 | 44 | return !empty($value); |
| 45 | - })->each(function ($value, $key) use (& $imageUrl) { |
|
| 46 | - $imageUrl .= $key . '=' . $value . '&'; |
|
| 45 | + })->each(function($value, $key) use (& $imageUrl) { |
|
| 46 | + $imageUrl .= $key.'='.$value.'&'; |
|
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | 49 | return static::replaceHosts($url, $imageUrl); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $url = str_replace(explode(',', $searchHosts), $replaceHost, $url); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - return !empty($url) ? $url . '?' . trim($imageUrl, '&') : ''; |
|
| 70 | + return !empty($url) ? $url.'?'.trim($imageUrl, '&') : ''; |
|
| 71 | 71 | |
| 72 | 72 | } |
| 73 | 73 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $modelPath = config('contentful.generator.model'); |
| 26 | 26 | |
| 27 | - foreach (glob($modelPath . '/*.php') as $file) { |
|
| 27 | + foreach (glob($modelPath.'/*.php') as $file) { |
|
| 28 | 28 | $modelInstance = NamespaceResolver::model(str_replace( |
| 29 | 29 | [$modelPath, '.php', '/'], |
| 30 | 30 | ['', '', '\\'], |
@@ -110,11 +110,11 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | private function entryMapper(array $entry): ContentfulMapper |
| 112 | 112 | { |
| 113 | - $class = studly_case($this->entryContentType($entry)) . 'Mapper'; |
|
| 113 | + $class = studly_case($this->entryContentType($entry)).'Mapper'; |
|
| 114 | 114 | $mapperClass = NamespaceResolver::mapper($class); |
| 115 | 115 | |
| 116 | 116 | if (empty($mapperClass) && !($mapperClass instanceof ContentfulMapper)) { |
| 117 | - throw new Exception('Unknown mapper: ' . $class); |
|
| 117 | + throw new Exception('Unknown mapper: '.$class); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return new $mapperClass; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $modelClass = NamespaceResolver::modelClass($model); |
| 134 | 134 | |
| 135 | 135 | if (empty($modelClass)) { |
| 136 | - throw new Exception('Unknown model: ' . $model); |
|
| 136 | + throw new Exception('Unknown model: '.$model); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | return new $modelClass; |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $order = 1; |
| 172 | 172 | foreach ($relationships as $relationship) { |
| 173 | 173 | if (!isset($relationship['id']) || !isset($relationship['type'])) { |
| 174 | - throw new Exception('Relationships malformed! (' . print_r($relationship, true) . ')'); |
|
| 174 | + throw new Exception('Relationships malformed! ('.print_r($relationship, true).')'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | DB::table('entry_relationships')->insert([ |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | if (!isset($data['payload'])) { |
| 233 | - throw new Exception('Mapper for model ' . class_basename($model) . ' must set a "payload" key'); |
|
| 233 | + throw new Exception('Mapper for model '.class_basename($model).' must set a "payload" key'); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | $instance = $this->instanceQueryBuilder($model, $data)->first(); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | if (!empty($class)) { |
| 28 | 28 | $model = new $class; |
| 29 | - return $model instanceof ContentfulModel?$model:null; |
|
| 29 | + return $model instanceof ContentfulModel ? $model : null; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return null; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | foreach (config($key, []) as $namespace) { |
| 56 | 56 | $modelClass = rtrim($namespace, |
| 57 | - '\\') . '\\' . ltrim(studly_case($element), '\\'); |
|
| 57 | + '\\').'\\'.ltrim(studly_case($element), '\\'); |
|
| 58 | 58 | |
| 59 | 59 | if (class_exists($modelClass)) { |
| 60 | 60 | return $modelClass; |