@@ -69,7 +69,7 @@ discard block |
||
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 |
||
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 | } |
@@ -52,12 +52,12 @@ discard block |
||
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 |
||
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 | } |
@@ -41,7 +41,7 @@ |
||
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 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function getSettingsHtml(): ?string |
181 | 181 | { |
182 | - $monacoLanguages = require(__DIR__ . '/MonacoLanguages.php'); |
|
182 | + $monacoLanguages = require(__DIR__.'/MonacoLanguages.php'); |
|
183 | 183 | $schemaFilePath = Craft::getAlias('@nystudio107/codefield/resources/IEditorOptionsSchema.json'); |
184 | 184 | $optionsSchema = @file_get_contents($schemaFilePath) ?: ''; |
185 | 185 | // Render the settings template |
@@ -205,14 +205,14 @@ discard block |
||
205 | 205 | // Extract just the languages that have been selected for display |
206 | 206 | $displayLanguages = []; |
207 | 207 | if ($this->showLanguageDropdown) { |
208 | - $monacoLanguages = require(__DIR__ . '/MonacoLanguages.php'); |
|
208 | + $monacoLanguages = require(__DIR__.'/MonacoLanguages.php'); |
|
209 | 209 | $decomposedLanguages = array_column($monacoLanguages, 'label', 'value'); |
210 | 210 | $displayLanguages = array_intersect_key($decomposedLanguages, array_flip($this->availableLanguages)); |
211 | 211 | // Handle "all" checkbox |
212 | 212 | if ($this->availableLanguages[0] === '*') { |
213 | 213 | $displayLanguages = $decomposedLanguages; |
214 | 214 | } |
215 | - $displayLanguages = array_map(static function ($k, $v) { |
|
215 | + $displayLanguages = array_map(static function($k, $v) { |
|
216 | 216 | return ['value' => $k, 'label' => $v]; |
217 | 217 | }, array_keys($displayLanguages), array_values($displayLanguages)); |
218 | 218 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | /** |
240 | 240 | * @inheritdoc |
241 | 241 | */ |
242 | - public function getContentGqlType(): Type|array |
|
242 | + public function getContentGqlType(): Type | array |
|
243 | 243 | { |
244 | 244 | $typeArray = CodeDataGenerator::generateTypes($this); |
245 | 245 |