Completed
Push — master ( 2a55de...a8ba96 )
by Maxime
13s queued 10s
created
src/Distilleries/Contentful/Import/AbstractImporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Commands/Sync/SyncLocales.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function resetLocales(array $locales)
68 68
     {
69
-        if (! empty($locales)) {
69
+        if (!empty($locales)) {
70 70
             Cache::forget('locale_default');
71 71
             Locale::query()->truncate();
72 72
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
             'country' => Locale::getCountry($locale['code']),
91 91
             'locale' => Locale::getLocale($locale['code']),
92 92
             'fallback_code' => $locale['fallbackCode'],
93
-            'is_default' => ! empty($locale['default']),
94
-            'is_editable' => ! empty($locale['contentManagementApi']),
95
-            'is_publishable' => ! empty($locale['contentDeliveryApi']),
93
+            'is_default' => !empty($locale['default']),
94
+            'is_editable' => !empty($locale['contentManagementApi']),
95
+            'is_publishable' => !empty($locale['contentDeliveryApi']),
96 96
         ]);
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Commands/Sync/SyncFlatten.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $bool = $this->option('no-switch');
73 73
 
74
-        return ! empty($bool) ? false : true;
74
+        return !empty($bool) ? false : true;
75 75
     }
76 76
 
77 77
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $bool = $this->option('no-truncate');
85 85
 
86
-        return ! empty($bool) ? true : false;
86
+        return !empty($bool) ? true : false;
87 87
     }
88 88
 
89 89
     /**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $bool = $this->option('preview');
97 97
 
98
-        return ! empty($bool) ? true : false;
98
+        return !empty($bool) ? true : false;
99 99
     }
100 100
 
101 101
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $bool = $this->option('multi');
109 109
 
110
-        return ! empty($bool) ? true : false;
110
+        return !empty($bool) ? true : false;
111 111
     }
112 112
 
113 113
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         $this->switchToSyncDb();
128 128
 
129
-        if (! $this->withoutTruncate()) {
129
+        if (!$this->withoutTruncate()) {
130 130
             $this->line('Truncate Contentful related tables');
131 131
             $this->assets->truncateRelatedTables();
132 132
             $this->entries->truncateRelatedTables();
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $bar = $this->createProgressBar($paginator->total());
168 168
         while ($paginator->isNotEmpty()) {
169 169
             foreach ($paginator->items() as $item) {
170
-                $bar->setMessage('Map entry ID: ' . $item->contentful_id);
170
+                $bar->setMessage('Map entry ID: '.$item->contentful_id);
171 171
                 $this->mapItemToContentfulModel($item, $locales);
172 172
                 $bar->advance();
173 173
             }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
                 $this->updateFromOtherThread($bar);
192 192
                 $items = collect();
193 193
 
194
-                DB::transaction(function () use ($release, & $items) {
194
+                DB::transaction(function() use ($release, & $items) {
195 195
                     $items = DB::table('sync_entries')
196 196
                         ->whereNull('release_id')
197 197
                         ->take(static::PER_BATCH)
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
                 $items = collect();
208 208
             }
209 209
 
210
-            $items->each(function ($item, $key) use ($locales, $bar) {
211
-                $bar->setMessage('Map entry ID: ' . $item->contentful_id);
210
+            $items->each(function($item, $key) use ($locales, $bar) {
211
+                $bar->setMessage('Map entry ID: '.$item->contentful_id);
212 212
                 $this->mapItemToContentfulModel($item, $locales);
213 213
                 $bar->advance();
214 214
             });
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         $bar = $this->output->createProgressBar($total);
251 251
 
252
-        $bar->setFormat("%message%" . PHP_EOL . " %current%/%max% [%bar%] %percent:3s%%");
252
+        $bar->setFormat("%message%".PHP_EOL." %current%/%max% [%bar%] %percent:3s%%");
253 253
 
254 254
         return $bar;
255 255
     }
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Commands/Sync/SyncSwitch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $bool = $this->option('live');
29 29
 
30
-        return ! empty($bool) ? true : false;
30
+        return !empty($bool) ? true : false;
31 31
     }
32 32
 
33 33
     /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $bool = $this->option('preview');
41 41
 
42
-        return ! empty($bool) ? true : false;
42
+        return !empty($bool) ? true : false;
43 43
     }
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Commands/Generators/Migrations.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $contentTypes = $this->api->contentTypes();
30 30
 
31
-        if (! empty($contentTypes['items'])) {
31
+        if (!empty($contentTypes['items'])) {
32 32
             array_unshift($contentTypes['items'], $this->assetContentType());
33 33
             foreach ($contentTypes['items'] as $contentType) {
34 34
                 if ($contentType['sys']['id'] !== 'asset') {
35
-                    $this->info('Content-Type: ' . Str::upper($contentType['name']));
35
+                    $this->info('Content-Type: '.Str::upper($contentType['name']));
36 36
                     $file = $this->createMigration($contentType);
37
-                    $this->line('Migration "' . $file . '" created');
37
+                    $this->line('Migration "'.$file.'" created');
38 38
                     sleep(1);
39 39
                 }
40 40
             }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $table = $this->tableName($contentType['sys']['id']);
54 54
 
55
-        $stubPath = __DIR__ . '/stubs/migration.stub';
56
-        $destPath = database_path('migrations/' . Carbon::now()->format('Y_m_d_His') . '_create_' . $table . '_table.php');
55
+        $stubPath = __DIR__.'/stubs/migration.stub';
56
+        $destPath = database_path('migrations/'.Carbon::now()->format('Y_m_d_His').'_create_'.$table.'_table.php');
57 57
 
58 58
         return static::writeStub($stubPath, $destPath, [
59 59
             'class' => Str::studly($table),
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/ObjectDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/json.stub';
12
+        $stubPath = __DIR__.'/stubs/json.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field' => $this->id(),
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function modelProperty()
24 24
     {
25
-        return ' * @property array $' . $this->snakeId();
25
+        return ' * @property array $'.$this->snakeId();
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
Distilleries/Contentful/Commands/Generators/Definitions/BaseDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         $content = file_get_contents($stubPath);
84 84
 
85 85
         foreach ($replacements as $key => $value) {
86
-            $content = str_replace('{{' . Str::upper($key) . '}}', $value, $content);
86
+            $content = str_replace('{{'.Str::upper($key).'}}', $value, $content);
87 87
         }
88 88
 
89 89
         return $content;
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/NumberDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/float.stub';
12
+        $stubPath = __DIR__.'/stubs/float.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field' => $this->id(),
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function modelProperty()
24 24
     {
25
-        return ' * @property float $' . $this->snakeId();
25
+        return ' * @property float $'.$this->snakeId();
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/SymbolDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/string.stub';
12
+        $stubPath = __DIR__.'/stubs/string.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field' => $this->id(),
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function modelProperty()
24 24
     {
25
-        return ' * @property string $' . $this->snakeId();
25
+        return ' * @property string $'.$this->snakeId();
26 26
     }
27 27
 }
Please login to merge, or discard this patch.