1313 * @see FieldDefinition
1414 * @see Argument
1515 *
16- * @psalm -import-type FieldResolver from Executor
17- * @psalm -import-type FieldDefinitionConfig from FieldDefinition
18- * @psalm -import-type FieldType from FieldDefinition
19- * @psalm -import-type ArgumentListConfig from Argument
20- * @psalm -import-type ArgumentType from Argument
16+ * @phpstan -import-type FieldResolver from Executor
17+ * @phpstan -import-type FieldDefinitionConfig from FieldDefinition
18+ * @phpstan -import-type FieldType from FieldDefinition
19+ * @phpstan -import-type ArgumentListConfig from Argument
20+ * @phpstan -import-type ArgumentType from Argument
2121 */
2222class FieldBuilder
2323{
24- /** @psalm -var FieldType */
24+ /** @phpstan -var FieldType */
2525 private mixed $ type ;
2626
2727 private string |null $ description = null ;
2828
2929 private string |null $ deprecationReason = null ;
3030
31- /** @psalm -var FieldResolver|null */
31+ /** @phpstan -var FieldResolver|null */
3232 private $ resolve ;
3333
34- /** @psalm -var (ArgumentListConfig&array)|null */
34+ /** @phpstan -var (ArgumentListConfig&array)|null */
3535 private array |null $ args = null ;
3636
37- /** @psalm -param FieldType $type */
37+ /** @phpstan -param FieldType $type */
3838 final private function __construct (private string $ name , $ type )
3939 {
4040 $ this ->type = $ type ;
4141 }
4242
4343 /**
44- * @psalm -param FieldType $type
44+ * @phpstan -param FieldType $type
4545 *
4646 * @return static
4747 */
@@ -59,7 +59,7 @@ public function setDescription(string $description): self
5959 }
6060
6161 /**
62- * @psalm -param ArgumentType $type
62+ * @phpstan -param ArgumentType $type
6363 *
6464 * @return $this
6565 */
@@ -81,12 +81,10 @@ public function addArgument(
8181 }
8282
8383 if ($ defaultValue !== null ) {
84- /** @psalm-suppress MixedAssignment */
8584 $ value ['defaultValue ' ] = $ defaultValue ;
8685 }
8786
8887 if ($ deprecationReason !== null ) {
89- /** @psalm-suppress MixedAssignment */
9088 $ value ['deprecationReason ' ] = $ deprecationReason ;
9189 }
9290
@@ -96,7 +94,7 @@ public function addArgument(
9694 }
9795
9896 /**
99- * @psalm -param FieldResolver $resolver
97+ * @phpstan -param FieldResolver $resolver
10098 *
10199 * @return $this
102100 */
@@ -115,7 +113,7 @@ public function setDeprecationReason(string $reason): self
115113 return $ this ;
116114 }
117115
118- /** @psalm -return FieldDefinitionConfig */
116+ /** @phpstan -return FieldDefinitionConfig */
119117 public function build (): array
120118 {
121119 return [
0 commit comments