diff --git a/src/Setting/DataType/BooleanSetting.php b/src/Setting/DataType/BooleanSetting.php index f950eb7..df89511 100644 --- a/src/Setting/DataType/BooleanSetting.php +++ b/src/Setting/DataType/BooleanSetting.php @@ -13,9 +13,7 @@ use TheCodingMachine\GraphQLite\Annotations\Type; use TheCodingMachine\GraphQLite\Types\ID; -/** - * @Type() - */ +#[Type] final class BooleanSetting { public function __construct( @@ -24,17 +22,13 @@ public function __construct( ) { } - /** - * @Field() - */ + #[Field] public function getName(): ID { return $this->name; } - /** - * @Field() - */ + #[Field] public function getValue(): bool { return $this->value; diff --git a/src/Setting/DataType/FloatSetting.php b/src/Setting/DataType/FloatSetting.php index 5aa3bec..eb87ef1 100644 --- a/src/Setting/DataType/FloatSetting.php +++ b/src/Setting/DataType/FloatSetting.php @@ -13,9 +13,7 @@ use TheCodingMachine\GraphQLite\Annotations\Type; use TheCodingMachine\GraphQLite\Types\ID; -/** - * @Type() - */ +#[Type] final class FloatSetting { public function __construct( @@ -24,17 +22,13 @@ public function __construct( ) { } - /** - * @Field() - */ + #[Field] public function getName(): ID { return $this->name; } - /** - * @Field() - */ + #[Field] public function getValue(): float { return $this->value; diff --git a/src/Setting/DataType/IntegerSetting.php b/src/Setting/DataType/IntegerSetting.php index 1caf963..04933c2 100644 --- a/src/Setting/DataType/IntegerSetting.php +++ b/src/Setting/DataType/IntegerSetting.php @@ -13,9 +13,7 @@ use TheCodingMachine\GraphQLite\Annotations\Type; use TheCodingMachine\GraphQLite\Types\ID; -/** - * @Type() - */ +#[Type] final class IntegerSetting { public function __construct( @@ -24,17 +22,13 @@ public function __construct( ) { } - /** - * @Field() - */ + #[Field] public function getName(): ID { return $this->name; } - /** - * @Field() - */ + #[Field] public function getValue(): int { return $this->value; diff --git a/src/Setting/DataType/SettingType.php b/src/Setting/DataType/SettingType.php index 9e46697..51e1636 100644 --- a/src/Setting/DataType/SettingType.php +++ b/src/Setting/DataType/SettingType.php @@ -14,9 +14,7 @@ use TheCodingMachine\GraphQLite\Annotations\Type; use TheCodingMachine\GraphQLite\Types\ID; -/** - * @Type - */ +#[Type] final class SettingType { public function __construct( @@ -25,25 +23,19 @@ public function __construct( ) { } - /** - * @Field - */ + #[Field] public function getName(): ID { return $this->name; } - /** - * @Field - */ + #[Field] public function getType(): string { return $this->type; } - /** - * @Field - */ + #[Field] public function isSupported(): bool { return FieldType::validateFieldType($this->getType()); diff --git a/src/Setting/DataType/StringSetting.php b/src/Setting/DataType/StringSetting.php index 8adbcff..5bde063 100644 --- a/src/Setting/DataType/StringSetting.php +++ b/src/Setting/DataType/StringSetting.php @@ -13,9 +13,7 @@ use TheCodingMachine\GraphQLite\Annotations\Type; use TheCodingMachine\GraphQLite\Types\ID; -/** - * @Type() - */ +#[Type] final class StringSetting { public function __construct( @@ -24,17 +22,13 @@ public function __construct( ) { } - /** - * @Field() - */ + #[Field] public function getName(): ID { return $this->name; } - /** - * @Field() - */ + #[Field] public function getValue(): string { return $this->value;