@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $queryParser->hasIncludes() === true ? array_keys($queryParser->getIncludes()) : null, |
167 | 167 | $queryParser->hasFields() === true ? $queryParser->getFields() : null |
168 | 168 | ); |
169 | - $responses = static::createResponses($requestUri, $provider, $jsonSchemes, $encoder, $encodingParams); |
|
169 | + $responses = static::createResponses($requestUri, $provider, $jsonSchemes, $encoder, $encodingParams); |
|
170 | 170 | |
171 | 171 | $noData = $relData === null || ($relData instanceof PaginatedDataInterface && $relData->getData() === null); |
172 | 172 | $response = $noData === true ? $responses->getCodeResponse(404) : $responses->getContentResponse($relData); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $queryParser->hasIncludes() === true ? array_keys($queryParser->getIncludes()) : null, |
208 | 208 | $queryParser->hasFields() === true ? $queryParser->getFields() : null |
209 | 209 | ); |
210 | - $responses = static::createResponses($requestUri, $provider, $jsonSchemes, $encoder, $encodingParams); |
|
210 | + $responses = static::createResponses($requestUri, $provider, $jsonSchemes, $encoder, $encodingParams); |
|
211 | 211 | |
212 | 212 | $noData = $relData === null || ($relData instanceof PaginatedDataInterface && $relData->getData() === null); |
213 | 213 | $response = $noData === true ? $responses->getCodeResponse(404) : $responses->getIdentifiersResponse($relData); |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | */ |
666 | 666 | protected static function assertClassValueDefined(?string $value): void |
667 | 667 | { |
668 | - assert(empty($value) === false, 'Value should be defined in `' . static::class . '`.'); |
|
668 | + assert(empty($value) === false, 'Value should be defined in `'.static::class.'`.'); |
|
669 | 669 | } |
670 | 670 | |
671 | 671 | /** |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | { |
679 | 679 | assert( |
680 | 680 | array_key_exists($interface, class_implements($class)) === true, |
681 | - "Class `$class` should implement `" . $interface . '` interface.' |
|
681 | + "Class `$class` should implement `".$interface.'` interface.' |
|
682 | 682 | ); |
683 | 683 | } |
684 | 684 | } |
@@ -162,7 +162,7 @@ |
||
162 | 162 | protected function setWrapperErrors(array $wrapperErrors): self |
163 | 163 | { |
164 | 164 | if (empty($wrapperErrors) === false) { |
165 | - assert(call_user_func(function () use ($wrapperErrors) : bool { |
|
165 | + assert(call_user_func(function() use ($wrapperErrors) : bool { |
|
166 | 166 | $allAreErrors = true; |
167 | 167 | |
168 | 168 | foreach ($wrapperErrors as $error) { |
@@ -50,18 +50,18 @@ discard block |
||
50 | 50 | |
51 | 51 | $container[FactoryInterface::class] = $factory; |
52 | 52 | |
53 | - $container[JsonSchemesInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
53 | + $container[JsonSchemesInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
54 | 54 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
55 | 55 | $modelSchemes = $container->get(ModelSchemeInfoInterface::class); |
56 | 56 | |
57 | 57 | return $factory->createJsonSchemes($settings[FluteSettings::KEY_MODEL_TO_SCHEME_MAP], $modelSchemes); |
58 | 58 | }; |
59 | 59 | |
60 | - $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) { |
|
60 | + $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) { |
|
61 | 61 | return new ParametersMapper($container->get(JsonSchemesInterface::class)); |
62 | 62 | }; |
63 | 63 | |
64 | - $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
64 | + $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
65 | 65 | /** @var JsonSchemesInterface $jsonSchemes */ |
66 | 66 | $jsonSchemes = $container->get(JsonSchemesInterface::class); |
67 | 67 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
@@ -76,19 +76,19 @@ discard block |
||
76 | 76 | return $encoder; |
77 | 77 | }; |
78 | 78 | |
79 | - $container[RelationshipPaginationStrategyInterface::class] = function (PsrContainerInterface $container) { |
|
79 | + $container[RelationshipPaginationStrategyInterface::class] = function(PsrContainerInterface $container) { |
|
80 | 80 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
81 | 81 | |
82 | 82 | return new BasicRelationshipPaginationStrategy($settings[FluteSettings::KEY_DEFAULT_PAGING_SIZE]); |
83 | 83 | }; |
84 | 84 | |
85 | - $container[JsonApiParserFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
85 | + $container[JsonApiParserFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
86 | 86 | $factory = new JsonApiParserFactory($container); |
87 | 87 | |
88 | 88 | return $factory; |
89 | 89 | }; |
90 | 90 | |
91 | - $container[FormValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
91 | + $container[FormValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
92 | 92 | $factory = new FormValidatorFactory($container); |
93 | 93 | |
94 | 94 | return $factory; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public static function configureExceptionHandler(LimoncelloContainerInterface $container) |
118 | 118 | { |
119 | - $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) { |
|
119 | + $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) { |
|
120 | 120 | /** @var CacheSettingsProviderInterface $provider */ |
121 | 121 | $provider = $container->get(CacheSettingsProviderInterface::class); |
122 | 122 | $appConfig = $provider->getApplicationConfiguration(); |
@@ -111,10 +111,10 @@ |
||
111 | 111 | ); |
112 | 112 | assert(empty($jsonQueryValFileMask) === false, "Invalid Query Validators file mask `$jsonQueryValFileMask`."); |
113 | 113 | |
114 | - $schemesPath = $schemesFolder . DIRECTORY_SEPARATOR . $schemesFileMask; |
|
115 | - $jsonDataValPath = $jsonDataValFolder . DIRECTORY_SEPARATOR . $jsonDataValFileMask; |
|
116 | - $formsValidatorsPath = $formsValFolder . DIRECTORY_SEPARATOR . $formsValFileMask; |
|
117 | - $jsonQueryValPath = $jsonQueryValFolder . DIRECTORY_SEPARATOR . $jsonQueryValFileMask; |
|
114 | + $schemesPath = $schemesFolder.DIRECTORY_SEPARATOR.$schemesFileMask; |
|
115 | + $jsonDataValPath = $jsonDataValFolder.DIRECTORY_SEPARATOR.$jsonDataValFileMask; |
|
116 | + $formsValidatorsPath = $formsValFolder.DIRECTORY_SEPARATOR.$formsValFileMask; |
|
117 | + $jsonQueryValPath = $jsonQueryValFolder.DIRECTORY_SEPARATOR.$jsonQueryValFileMask; |
|
118 | 118 | |
119 | 119 | $requireUniqueTypes = $defaults[static::KEY_SCHEMAS_REQUIRE_UNIQUE_TYPES] ?? true; |
120 | 120 |
@@ -212,12 +212,12 @@ |
||
212 | 212 | return [static::DATA => $data->getData()]; |
213 | 213 | } |
214 | 214 | |
215 | - $buildUrl = function ($offset) use ($data, $uri) { |
|
215 | + $buildUrl = function($offset) use ($data, $uri) { |
|
216 | 216 | $paramsWithPaging = [ |
217 | 217 | JsonApiQueryValidatingParserInterface::PARAM_PAGING_OFFSET => $offset, |
218 | 218 | JsonApiQueryValidatingParserInterface::PARAM_PAGING_LIMIT => $data->getLimit(), |
219 | 219 | ]; |
220 | - $fullUrl = $uri . '?' . http_build_query($paramsWithPaging); |
|
220 | + $fullUrl = $uri.'?'.http_build_query($paramsWithPaging); |
|
221 | 221 | |
222 | 222 | return $fullUrl; |
223 | 223 | }; |