2727use Illuminate \Support \Collection ;
2828use Illuminate \Support \Facades \Validator as ValidatorFacade ;
2929use Illuminate \Validation \Validator ;
30+ use Override ;
3031use yii \db \Schema ;
3132
3233use function CraftCms \Cms \t ;
@@ -69,7 +70,7 @@ abstract class BaseOptionsField extends Field implements CrossSiteCopyableFieldI
6970 /**
7071 * {@inheritdoc}
7172 */
72- #[\ Override]
73+ #[Override]
7374 public static function phpType (): string
7475 {
7576 return sprintf ('\\%s ' , static ::$ multi ? MultiOptionsFieldData::class : SingleOptionFieldData::class);
@@ -78,7 +79,7 @@ public static function phpType(): string
7879 /**
7980 * {@inheritdoc}
8081 */
81- #[\ Override]
82+ #[Override]
8283 public static function dbType (): string
8384 {
8485 return static ::$ multi ? Schema::TYPE_JSON : Schema::TYPE_STRING ;
@@ -87,7 +88,7 @@ public static function dbType(): string
8788 /**
8889 * {@inheritdoc}
8990 */
90- #[\ Override]
91+ #[Override]
9192 public static function modifyQuery (Builder $ query , array $ instances , mixed $ value ): Builder
9293 {
9394 if (! static ::$ multi ) {
@@ -180,13 +181,13 @@ public function __construct($config = [])
180181 public function settingsAttributes (): array
181182 {
182183 $ attributes = parent ::settingsAttributes ();
183- $ attributes [' options ' ] = $ this -> options ;
184- $ attributes [' customOptions ' ] = $ this -> customOptions ;
184+ $ attributes [] = ' options ' ;
185+ $ attributes [] = ' customOptions ' ;
185186
186187 return $ attributes ;
187188 }
188189
189- #[\ Override]
190+ #[Override]
190191 public static function getRules (): array
191192 {
192193 return array_merge (parent ::getRules (), [
@@ -351,7 +352,7 @@ public function getSettingsHtml(): string
351352 /**
352353 * {@inheritdoc}
353354 */
354- #[\ Override]
355+ #[Override]
355356 public function normalizeValue (mixed $ value , ?ElementInterface $ element ): mixed
356357 {
357358 if ($ value instanceof MultiOptionsFieldData || $ value instanceof SingleOptionFieldData) {
@@ -441,7 +442,7 @@ protected function isOptionSelected(array $option, mixed $value, array &$selecte
441442 /**
442443 * {@inheritdoc}
443444 */
444- #[\ Override]
445+ #[Override]
445446 public function serializeValue (mixed $ value , ?ElementInterface $ element ): mixed
446447 {
447448 if ($ value instanceof MultiOptionsFieldData) {
@@ -471,7 +472,7 @@ public function serializeValue(mixed $value, ?ElementInterface $element): mixed
471472 /**
472473 * {@inheritdoc}
473474 */
474- #[\ Override]
475+ #[Override]
475476 protected function searchKeywords (mixed $ value , ElementInterface $ element ): string
476477 {
477478 $ keywords = [];
@@ -504,7 +505,7 @@ public function getElementConditionRuleType(): array|string
504505 /**
505506 * {@inheritdoc}
506507 */
507- #[\ Override]
508+ #[Override]
508509 public function getElementValidationRules (): array
509510 {
510511 return [
@@ -526,7 +527,7 @@ function (ElementInterface $element) {
526527 /**
527528 * {@inheritdoc}
528529 */
529- #[\ Override]
530+ #[Override]
530531 public function isValueEmpty (mixed $ value , ElementInterface $ element ): bool
531532 {
532533 if ($ value instanceof MultiOptionsFieldData) {
@@ -539,7 +540,7 @@ public function isValueEmpty(mixed $value, ElementInterface $element): bool
539540 /**
540541 * {@inheritdoc}
541542 */
542- #[\ Override]
543+ #[Override]
543544 public function getPreviewHtml (mixed $ value , ElementInterface $ element ): string
544545 {
545546 if (static ::$ multi ) {
@@ -596,7 +597,7 @@ public function getPreviewHtml(mixed $value, ElementInterface $element): string
596597 /**
597598 * {@inheritdoc}
598599 */
599- #[\ Override]
600+ #[Override]
600601 public function previewPlaceholderHtml (mixed $ value , ?ElementInterface $ element ): string
601602 {
602603 $ options = array_values (array_filter ($ this ->options , fn ($ option ) => ! empty ($ option ['value ' ])));
@@ -627,7 +628,7 @@ public function getIsMultiOptionsField(): bool
627628 /**
628629 * {@inheritdoc}
629630 */
630- #[\ Override]
631+ #[Override]
631632 public function getContentGqlType (): array
632633 {
633634 return [
@@ -641,7 +642,7 @@ public function getContentGqlType(): array
641642 /**
642643 * {@inheritdoc}
643644 */
644- #[\ Override]
645+ #[Override]
645646 public function getContentGqlMutationArgumentType (): Type |array
646647 {
647648 $ values = [];
0 commit comments