Passed
Push — develop-v4 ( 9448ba...df4f03 )
by Andrew
23:51 queued 19:40
created
src/CodeField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         Event::on(
70 70
             Fields::class,
71 71
             Fields::EVENT_REGISTER_FIELD_TYPES,
72
-            static function (RegisterComponentTypesEvent $event) {
72
+            static function(RegisterComponentTypesEvent $event) {
73 73
                 $event->types[] = Code::class;
74 74
             }
75 75
         );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         Event::on(
78 78
             Plugins::class,
79 79
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
80
-            function (PluginEvent $event) {
80
+            function(PluginEvent $event) {
81 81
                 if ($event->plugin === $this) {
82 82
                 }
83 83
             }
Please login to merge, or discard this patch.
src/gql/types/generators/CodeDataGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
             ?: GqlEntityRegistry::createEntity($typeName, new CodeDataType([
53 53
                 'name' => $typeName,
54 54
                 'description' => 'This entity has all the CodeData properties',
55
-                'fields' => function () use ($codeDataFields) {
55
+                'fields' => function() use ($codeDataFields) {
56 56
                     return $codeDataFields;
57 57
                 },
58 58
             ]));
59 59
 
60
-        TypeLoader::registerType($typeName, function () use ($codeDataType) {
60
+        TypeLoader::registerType($typeName, function() use ($codeDataType) {
61 61
             return $codeDataType;
62 62
         });
63 63
 
@@ -70,6 +70,6 @@  discard block
 block discarded – undo
70 70
     public static function getName($context = null): string
71 71
     {
72 72
         /** @var Code $context */
73
-        return $context->handle . '_CodeData';
73
+        return $context->handle.'_CodeData';
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
src/models/CodeData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function __toString(): string
43 43
     {
44
-        return (string)$this->value;
44
+        return (string) $this->value;
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
src/fields/Code.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function getSettingsHtml(): ?string
180 180
     {
181
-        $monacoLanguages = require(__DIR__ . '/MonacoLanguages.php');
181
+        $monacoLanguages = require(__DIR__.'/MonacoLanguages.php');
182 182
         $schemaFilePath = Craft::getAlias('@nystudio107/codefield/resources/IEditorOptionsSchema.json');
183 183
         $optionsSchema = @file_get_contents($schemaFilePath) ?: '';
184 184
         // Render the settings template
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     /**
222 222
      * @inheritdoc
223 223
      */
224
-    public function getContentGqlType(): Type|array
224
+    public function getContentGqlType(): Type | array
225 225
     {
226 226
         $typeArray = CodeDataGenerator::generateTypes($this);
227 227
 
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
         // Extract just the languages that have been selected for display
286 286
         $displayLanguages = [];
287 287
         if ($this->showLanguageDropdown) {
288
-            $monacoLanguages = require(__DIR__ . '/MonacoLanguages.php');
288
+            $monacoLanguages = require(__DIR__.'/MonacoLanguages.php');
289 289
             $decomposedLanguages = array_column($monacoLanguages, 'label', 'value');
290 290
             $displayLanguages = array_intersect_key($decomposedLanguages, array_flip($this->availableLanguages));
291 291
             // Handle "all" checkbox
292 292
             if ($this->availableLanguages[0] === '*') {
293 293
                 $displayLanguages = $decomposedLanguages;
294 294
             }
295
-            $displayLanguages = array_map(static function ($k, $v) {
295
+            $displayLanguages = array_map(static function($k, $v) {
296 296
                 return ['value' => $k, 'label' => $v];
297 297
             }, array_keys($displayLanguages), array_values($displayLanguages));
298 298
         }
Please login to merge, or discard this patch.