Completed
Push — master ( f4588e...60b2e1 )
by Maxime
02:53
created
src/Distilleries/Contentful/Helpers/NamspaceResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     {
55 55
         foreach (config($key, []) as $namespace) {
56 56
             $modelClass = rtrim($namespace,
57
-                    '\\') . '\\' . studly_case($element);
57
+                    '\\').'\\'.studly_case($element);
58 58
 
59 59
             if (class_exists($modelClass)) {
60 60
                 return $modelClass;
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Repositories/EntriesRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 (!class_exists($mapperClass)) {
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.