File tree Expand file tree Collapse file tree 9 files changed +13
-35
lines changed
tests/Fixtures/TestBundle Expand file tree Collapse file tree 9 files changed +13
-35
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ class TypeBuilderTest extends TestCase
5454 use ProphecyTrait;
5555
5656 private ObjectProphecy $ typesContainerProphecy ;
57- /** @var callable */
5857 private \Closure $ defaultFieldResolver ;
5958 private ObjectProphecy $ fieldsBuilderLocatorProphecy ;
6059 private TypeBuilder $ typeBuilder ;
Original file line number Diff line number Diff line change @@ -1099,9 +1099,6 @@ public function withTypes(array|string $types): static
10991099 return $ self ;
11001100 }
11011101
1102- /**
1103- * @return array|mixed|string|null
1104- */
11051102 public function getFormats (): string |array |null
11061103 {
11071104 return $ this ->formats ;
@@ -1115,17 +1112,11 @@ public function withFormats(mixed $formats): static
11151112 return $ self ;
11161113 }
11171114
1118- /**
1119- * @return array|mixed|string|null
1120- */
11211115 public function getInputFormats (): string |array |null
11221116 {
11231117 return $ this ->inputFormats ;
11241118 }
11251119
1126- /**
1127- * @param mixed|null $inputFormats
1128- */
11291120 public function withInputFormats (string |array |null $ inputFormats ): static
11301121 {
11311122 $ self = clone $ this ;
@@ -1134,17 +1125,11 @@ public function withInputFormats(string|array|null $inputFormats): static
11341125 return $ self ;
11351126 }
11361127
1137- /**
1138- * @return array|mixed|string|null
1139- */
11401128 public function getOutputFormats (): string |array |null
11411129 {
11421130 return $ this ->outputFormats ;
11431131 }
11441132
1145- /**
1146- * @param mixed|null $outputFormats
1147- */
11481133 public function withOutputFormats (string |array |null $ outputFormats ): static
11491134 {
11501135 $ self = clone $ this ;
Original file line number Diff line number Diff line change 2121class Operation extends AbstractOperation
2222{
2323 /**
24- * @param Link[]|null $links
25- * @param array{
26- * class?: string|null,
27- * name?: string,
28- * }|string|false|null $input {@see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation}
29- * @param array{
30- * class?: string|null,
31- * name?: string,
32- * }|string|false|null $output {@see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation}
24+ * @param Link[]|null $links
25+ * @param string|null $input {@see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation}
26+ * @param string|null $output {@see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation}
3327 * @param string|array|bool|null $mercure {@see https://api-platform.com/docs/core/mercure}
3428 * @param string|bool|null $messenger {@see https://api-platform.com/docs/core/messenger/#dispatching-a-resource-through-the-message-bus}
35- * @param string|callable| null $provider {@see https://api-platform.com/docs/core/state-providers/#state-providers}
29+ * @param string|null $provider {@see https://api-platform.com/docs/core/state-providers/#state-providers}
3630 * @param string|callable|null $processor {@see https://api-platform.com/docs/core/state-processors/#state-processors}
3731 */
3832 public function __construct (
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ public function __construct(
5353 ?string $ deprecationReason = null ,
5454 ?array $ filters = null ,
5555 ?array $ validationContext = null ,
56- ?array $ input = null ,
57- ?array $ output = null ,
56+ ?string $ input = null ,
57+ ?string $ output = null ,
5858 $ mercure = null ,
5959 $ messenger = null ,
6060 ?int $ urlGenerationStrategy = null ,
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ public function __construct(
5454 ?string $ deprecationReason = null ,
5555 ?array $ filters = null ,
5656 ?array $ validationContext = null ,
57- ?array $ input = null ,
58- ?array $ output = null ,
57+ ?string $ input = null ,
58+ ?string $ output = null ,
5959 $ mercure = null ,
6060 $ messenger = null ,
6161 ?int $ urlGenerationStrategy = null ,
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ public function __construct(
5353 ?string $ deprecationReason = null ,
5454 ?array $ filters = null ,
5555 ?array $ validationContext = null ,
56- ?array $ input = null ,
57- ?array $ output = null ,
56+ ?string $ input = null ,
57+ ?string $ output = null ,
5858 $ mercure = null ,
5959 $ messenger = null ,
6060 ?int $ urlGenerationStrategy = null ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ trait BackedEnumStringTrait
2020{
2121 public static function values (): array
2222 {
23- return array_map (static fn (\BackedEnum $ feature ): int | string => $ feature ->value , self ::cases ());
23+ return array_map (static fn (\BackedEnum $ feature ): string => $ feature ->value , self ::cases ());
2424 }
2525
2626 public function getId (): string
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ trait BackedEnumTrait
2020{
2121 public static function values (): array
2222 {
23- return array_map (static fn (\BackedEnum $ feature ): int | string => $ feature ->value , self ::cases ());
23+ return array_map (static fn (\BackedEnum $ feature ): int => $ feature ->value , self ::cases ());
2424 }
2525
2626 public function getId (): int
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class FooDummy
4545 private $ name ;
4646
4747 #[ORM \Column(nullable: true )]
48- private string $ nonWritableProp ;
48+ private ? string $ nonWritableProp = null ;
4949
5050 #[ApiProperty(readableLink: true , writableLink: true )]
5151 #[ORM \Embedded(class: FooEmbeddable::class)]
You can’t perform that action at this time.
0 commit comments