@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $this->sectionId = $this->twigfieldOptions[self::OPTIONS_DATA_KEY] ?? null; |
| 68 | 68 | // Base CP templates directory |
| 69 | - Event::on(Sections::class, Sections::EVENT_AFTER_SAVE_SECTION, function (SectionEvent $e) { |
|
| 69 | + Event::on(Sections::class, Sections::EVENT_AFTER_SAVE_SECTION, function(SectionEvent $e) { |
|
| 70 | 70 | $config = [ |
| 71 | 71 | 'fieldType' => $this->fieldType, |
| 72 | 72 | 'twigfieldOptions' => [ |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | ->insertText($key) |
| 102 | 102 | ->label($key) |
| 103 | 103 | ->detail(Craft::t('twigfield', 'Field Shorthand')) |
| 104 | - ->documentation($element::displayName() . ' ' . $value) |
|
| 104 | + ->documentation($element::displayName().' '.$value) |
|
| 105 | 105 | ->kind(CompleteItemKind::PropertyKind) |
| 106 | 106 | ->add($this); |
| 107 | 107 | } |
@@ -128,11 +128,11 @@ discard block |
||
| 128 | 128 | $dependency = new TagDependency([ |
| 129 | 129 | 'tags' => [ |
| 130 | 130 | self::AUTOCOMPLETE_CACHE_TAG, |
| 131 | - self::AUTOCOMPLETE_CACHE_TAG . $name, |
|
| 131 | + self::AUTOCOMPLETE_CACHE_TAG.$name, |
|
| 132 | 132 | ], |
| 133 | 133 | ]); |
| 134 | 134 | // Get the autocompletes from the cache, or generate them if they aren't cached |
| 135 | - $autocompleteItems[$name] = $cache->getOrSet($cacheKey, static function () use ($name, $autocomplete) { |
|
| 135 | + $autocompleteItems[$name] = $cache->getOrSet($cacheKey, static function() use ($name, $autocomplete) { |
|
| 136 | 136 | $autocomplete->generateCompleteItems(); |
| 137 | 137 | return [ |
| 138 | 138 | 'name' => $name, |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | public function clearAutocompleteCache(string $autocompleteName = ''): void |
| 157 | 157 | { |
| 158 | 158 | $cache = Craft::$app->getCache(); |
| 159 | - TagDependency::invalidate($cache, self::AUTOCOMPLETE_CACHE_TAG . $autocompleteName); |
|
| 159 | + TagDependency::invalidate($cache, self::AUTOCOMPLETE_CACHE_TAG.$autocompleteName); |
|
| 160 | 160 | Craft::info('Twigfield caches invalidated', __METHOD__); |
| 161 | 161 | } |
| 162 | 162 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function getAutocompleteCacheKey(AutocompleteInterface $autocomplete, array $config): string |
| 171 | 171 | { |
| 172 | - return $this->cacheKeyPrefix . $autocomplete->name . md5(serialize($config)); |
|
| 172 | + return $this->cacheKeyPrefix.$autocomplete->name.md5(serialize($config)); |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | // Protected Methods |