@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | * @param string $name |
271 | 271 | * @param iterable $operationsAndArgs |
272 | 272 | * |
273 | - * @return iterable |
|
273 | + * @return \Generator |
|
274 | 274 | */ |
275 | 275 | private function getValidatedOperationsAndArguments( |
276 | 276 | int $blockIndex, |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | * @param string $name |
288 | 288 | * @param iterable $arguments |
289 | 289 | * |
290 | - * @return iterable |
|
290 | + * @return \Generator |
|
291 | 291 | */ |
292 | 292 | private function getValidatedArguments(int $blockIndex, string $name, iterable $arguments): iterable |
293 | 293 | { |
@@ -378,7 +378,7 @@ |
||
378 | 378 | /** |
379 | 379 | * @return int[]|null |
380 | 380 | */ |
381 | - private function getAttributeRules(): ?array |
|
381 | + private function getAttributeRules(): ? array |
|
382 | 382 | { |
383 | 383 | return $this->attributeRules; |
384 | 384 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | public function getMappedIncludes(): iterable |
246 | 246 | { |
247 | 247 | $fromScheme = $this->getRootScheme(); |
248 | - $getMappedRelLinks = function (iterable $links) use ($fromScheme) : iterable { |
|
248 | + $getMappedRelLinks = function(iterable $links) use ($fromScheme) : iterable { |
|
249 | 249 | foreach ($links as $link) { |
250 | 250 | assert(is_string($link)); |
251 | 251 | $fromSchemaClass = get_class($fromScheme); |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | // ['rel2_name1', ], |
290 | 290 | // ['rel3_name1', 'rel3_name2', 'rel3_name3', ], |
291 | 291 | // ] |
292 | - $includeAsModelNames = function (iterable $relationships): iterable { |
|
292 | + $includeAsModelNames = function(iterable $relationships): iterable { |
|
293 | 293 | foreach ($relationships as $relationship) { |
294 | 294 | assert($relationship instanceof RelationshipInterface); |
295 | 295 | yield $relationship->getNameInModel(); |
296 | 296 | } |
297 | 297 | }; |
298 | 298 | $mappedIncludes = $this->getMappedIncludes(); |
299 | - $getIncludes = function () use ($mappedIncludes, $includeAsModelNames) : iterable { |
|
299 | + $getIncludes = function() use ($mappedIncludes, $includeAsModelNames) : iterable { |
|
300 | 300 | foreach ($mappedIncludes as $relationships) { |
301 | 301 | yield $includeAsModelNames($relationships); |
302 | 302 | } |
@@ -54,22 +54,22 @@ discard block |
||
54 | 54 | |
55 | 55 | $container[FactoryInterface::class] = $factory; |
56 | 56 | |
57 | - $container[JsonSchemesInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
57 | + $container[JsonSchemesInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
58 | 58 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
59 | 59 | $modelSchemes = $container->get(ModelSchemeInfoInterface::class); |
60 | 60 | |
61 | 61 | return $factory->createJsonSchemes($settings[FluteSettings::KEY_MODEL_TO_SCHEME_MAP], $modelSchemes); |
62 | 62 | }; |
63 | 63 | |
64 | - $container[QueryParserInterface::class] = function (PsrContainerInterface $container) { |
|
64 | + $container[QueryParserInterface::class] = function(PsrContainerInterface $container) { |
|
65 | 65 | return new QueryParser($container->get(PaginationStrategyInterface::class)); |
66 | 66 | }; |
67 | 67 | |
68 | - $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) { |
|
68 | + $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) { |
|
69 | 69 | return new ParametersMapper($container->get(JsonSchemesInterface::class)); |
70 | 70 | }; |
71 | 71 | |
72 | - $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
72 | + $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
73 | 73 | /** @var JsonSchemesInterface $jsonSchemes */ |
74 | 74 | $jsonSchemes = $container->get(JsonSchemesInterface::class); |
75 | 75 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return $encoder; |
85 | 85 | }; |
86 | 86 | |
87 | - $container[PaginationStrategyInterface::class] = function (PsrContainerInterface $container) { |
|
87 | + $container[PaginationStrategyInterface::class] = function(PsrContainerInterface $container) { |
|
88 | 88 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
89 | 89 | |
90 | 90 | return new PaginationStrategy( |
@@ -93,19 +93,19 @@ discard block |
||
93 | 93 | ); |
94 | 94 | }; |
95 | 95 | |
96 | - $container[JsonApiValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
96 | + $container[JsonApiValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
97 | 97 | $factory = new JsonApiValidatorFactory($container); |
98 | 98 | |
99 | 99 | return $factory; |
100 | 100 | }; |
101 | 101 | |
102 | - $container[FormValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
102 | + $container[FormValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
103 | 103 | $factory = new FormValidatorFactory($container); |
104 | 104 | |
105 | 105 | return $factory; |
106 | 106 | }; |
107 | 107 | |
108 | - $container[QueryValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
108 | + $container[QueryValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
109 | 109 | /** @var PaginationStrategyInterface $paginationStrategy */ |
110 | 110 | $paginationStrategy = $container->get(PaginationStrategyInterface::class); |
111 | 111 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public static function configureExceptionHandler(LimoncelloContainerInterface $container) |
139 | 139 | { |
140 | - $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) { |
|
140 | + $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) { |
|
141 | 141 | /** @var CacheSettingsProviderInterface $provider */ |
142 | 142 | $provider = $container->get(CacheSettingsProviderInterface::class); |
143 | 143 | $appConfig = $provider->getApplicationConfiguration(); |
@@ -133,9 +133,9 @@ |
||
133 | 133 | ); |
134 | 134 | assert(empty($formsValFileMask) === false, "Invalid Forms Validators file mask `$formsValFileMask`."); |
135 | 135 | |
136 | - $schemesPath = $schemesFolder . DIRECTORY_SEPARATOR . $schemesFileMask; |
|
137 | - $jsonValidatorsPath = $jsonValFolder . DIRECTORY_SEPARATOR . $jsonValFileMask; |
|
138 | - $formsValidatorsPath = $formsValFolder . DIRECTORY_SEPARATOR . $formsValFileMask; |
|
136 | + $schemesPath = $schemesFolder.DIRECTORY_SEPARATOR.$schemesFileMask; |
|
137 | + $jsonValidatorsPath = $jsonValFolder.DIRECTORY_SEPARATOR.$jsonValFileMask; |
|
138 | + $formsValidatorsPath = $formsValFolder.DIRECTORY_SEPARATOR.$formsValFileMask; |
|
139 | 139 | |
140 | 140 | $requireUniqueTypes = $defaults[static::KEY_SCHEMES_REQUIRE_UNIQUE_TYPES] ?? true; |
141 | 141 |