Completed
Push — master ( 3576d4...095dbc )
by Maxime
12s queued 11s
created
src/Distilleries/Contentful/ServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
     public function boot()
39 39
     {
40 40
         $this->publishes([
41
-            __DIR__ . '/../../config/config.php' => base_path('config/' . $this->package . '.php'),
41
+            __DIR__.'/../../config/config.php' => base_path('config/'.$this->package.'.php'),
42 42
         ], 'config');
43 43
 
44
-        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/');
44
+        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations/');
45 45
     }
46 46
 
47 47
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function register()
53 53
     {
54
-        $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', $this->package);
54
+        $this->mergeConfigFrom(__DIR__.'/../../config/config.php', $this->package);
55 55
 
56 56
         $this->app->bind(Api\DeliveryApi::class, Api\Delivery\Cached::class);
57 57
         $this->app->bind(Api\ManagementApi::class, Api\Management\Api::class);
@@ -70,31 +70,31 @@  discard block
 block discarded – undo
70 70
      */
71 71
     private function registerCommands()
72 72
     {
73
-        $this->app->singleton('command.contentful.model', function () {
73
+        $this->app->singleton('command.contentful.model', function() {
74 74
             return new Commands\Generators\Models(app(Api\ManagementApi::class));
75 75
         });
76
-        $this->app->singleton('command.contentful.migration', function () {
76
+        $this->app->singleton('command.contentful.migration', function() {
77 77
             return new Commands\Generators\Migrations(app(Api\ManagementApi::class));
78 78
         });
79
-        $this->app->singleton('command.contentful.sync', function () {
79
+        $this->app->singleton('command.contentful.sync', function() {
80 80
             return new Commands\Sync\Sync;
81 81
         });
82
-        $this->app->singleton('command.contentful.sync-switch', function () {
82
+        $this->app->singleton('command.contentful.sync-switch', function() {
83 83
             return new Commands\Sync\SyncSwitch;
84 84
         });
85
-        $this->app->singleton('command.contentful.sync-data', function () {
85
+        $this->app->singleton('command.contentful.sync-data', function() {
86 86
             return new Commands\Sync\SyncData(app(Api\SyncApi::class));
87 87
         });
88
-        $this->app->singleton('command.contentful.sync-flatten', function () {
88
+        $this->app->singleton('command.contentful.sync-flatten', function() {
89 89
             return new Commands\Sync\SyncFlatten;
90 90
         });
91
-        $this->app->singleton('command.contentful.sync-locales', function () {
91
+        $this->app->singleton('command.contentful.sync-locales', function() {
92 92
             return new Commands\Sync\SyncLocales(app(Api\ManagementApi::class));
93 93
         });
94
-        $this->app->singleton('command.contentful.import-clean', function () {
94
+        $this->app->singleton('command.contentful.import-clean', function() {
95 95
             return new Commands\Import\ImportClean(app(Api\ManagementApi::class));
96 96
         });
97
-        $this->app->singleton('command.contentful.import-publish', function () {
97
+        $this->app->singleton('command.contentful.import-publish', function() {
98 98
             return new Commands\Import\ImportPublish(app(Api\ManagementApi::class));
99 99
         });
100 100
 
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Webhook/EntryHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function handle(string $action, array $payload, bool $isPreview)
36 36
     {
37 37
         $actionMethods = ['create', 'archive', 'unarchive', 'publish', 'unpublish', 'delete'];
38
-        $actionMethods = ! empty($isPreview) ? array_merge($actionMethods, ['save', 'auto_save']): $actionMethods;
38
+        $actionMethods = !empty($isPreview) ? array_merge($actionMethods, ['save', 'auto_save']) : $actionMethods;
39 39
 
40 40
         if (method_exists($this, $action) && in_array($action, $actionMethods)) {
41 41
             $this->$action($payload);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     {
159 159
         $locales = Locale::all();
160 160
         $locales = is_array($locales) ? collect($locales) : $locales;
161
-        $this->entries->toContentfulModel($payload,$locales);
161
+        $this->entries->toContentfulModel($payload, $locales);
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.
src/Distilleries/Contentful/Webhook/Manager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function handle(array $headers, array $payload, bool $isPreview = false): array
18 18
     {
19
-        if (! isset($headers['x-contentful-topic'])) {
19
+        if (!isset($headers['x-contentful-topic'])) {
20 20
             return $this->response('Page not found', 404);
21 21
         }
22 22
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 $handler = null;
38 38
         }
39 39
 
40
-        if (! empty($handler)) {
40
+        if (!empty($handler)) {
41 41
             try {
42 42
                 $handler->handle($topics[2], $payload, $isPreview);
43 43
             } catch (Exception $e) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         return [
61 61
             'status' => $status,
62
-            'message' => ! empty($message) ? $message : null,
62
+            'message' => !empty($message) ? $message : null,
63 63
         ];
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/IntegerDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/integer.stub';
12
+        $stubPath = __DIR__.'/stubs/integer.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/BooleanDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/boolean.stub';
12
+        $stubPath = __DIR__.'/stubs/boolean.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.
Distilleries/Contentful/Commands/Generators/Definitions/DateDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/datetime.stub';
12
+        $stubPath = __DIR__.'/stubs/datetime.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/ObjectDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 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_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/LocationDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public function modelGetter()
11 11
     {
12
-        $stubPath = __DIR__ . '/stubs/location.stub';
12
+        $stubPath = __DIR__.'/stubs/location.stub';
13 13
 
14 14
         return self::getStub($stubPath, [
15 15
             'field_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.
Contentful/Commands/Generators/Definitions/NumberDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function modelGetter()
12 12
     {
13
-        $stubPath = __DIR__ . '/stubs/float.stub';
13
+        $stubPath = __DIR__.'/stubs/float.stub';
14 14
 
15 15
         return self::getStub($stubPath, [
16 16
             'field_camel' => studly_case($this->id()),
Please login to merge, or discard this patch.