@@ -792,7 +792,7 @@ discard block |
||
| 792 | 792 | */ |
| 793 | 793 | private static function assertClassValueDefined(?string $value): void |
| 794 | 794 | { |
| 795 | - assert(empty($value) === false, 'Value should be defined in `' . static::class . '`.'); |
|
| 795 | + assert(empty($value) === false, 'Value should be defined in `'.static::class.'`.'); |
|
| 796 | 796 | } |
| 797 | 797 | |
| 798 | 798 | /** |
@@ -805,7 +805,7 @@ discard block |
||
| 805 | 805 | { |
| 806 | 806 | assert( |
| 807 | 807 | array_key_exists($interface, class_implements($class)) === true, |
| 808 | - "Class `$class` should implement `" . $interface . '` interface.' |
|
| 808 | + "Class `$class` should implement `".$interface.'` interface.' |
|
| 809 | 809 | ); |
| 810 | 810 | } |
| 811 | 811 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | public function getMappedIncludes(): iterable |
| 247 | 247 | { |
| 248 | 248 | $fromSchema = $this->getRootSchema(); |
| 249 | - $getMappedRelLinks = function (iterable $links) use ($fromSchema) : iterable { |
|
| 249 | + $getMappedRelLinks = function(iterable $links) use ($fromSchema) : iterable { |
|
| 250 | 250 | foreach ($links as $link) { |
| 251 | 251 | assert(is_string($link)); |
| 252 | 252 | $fromSchemaClass = get_class($fromSchema); |
@@ -296,14 +296,14 @@ discard block |
||
| 296 | 296 | // ['rel2_name1', ], |
| 297 | 297 | // ['rel3_name1', 'rel3_name2', 'rel3_name3', ], |
| 298 | 298 | // ] |
| 299 | - $includeAsModelNames = function (iterable $relationships): iterable { |
|
| 299 | + $includeAsModelNames = function(iterable $relationships): iterable { |
|
| 300 | 300 | foreach ($relationships as $relationship) { |
| 301 | 301 | assert($relationship instanceof RelationshipInterface); |
| 302 | 302 | yield $relationship->getNameInModel(); |
| 303 | 303 | } |
| 304 | 304 | }; |
| 305 | 305 | $mappedIncludes = $this->getMappedIncludes(); |
| 306 | - $getIncludes = function () use ($mappedIncludes, $includeAsModelNames) : iterable { |
|
| 306 | + $getIncludes = function() use ($mappedIncludes, $includeAsModelNames) : iterable { |
|
| 307 | 307 | foreach ($mappedIncludes as $relationships) { |
| 308 | 308 | yield $includeAsModelNames($relationships); |
| 309 | 309 | } |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | $classAtPath = new ArrayObject(); |
| 690 | 690 | $idsAtPath = new ArrayObject(); |
| 691 | 691 | |
| 692 | - $registerModelAtRoot = function ($model) use ($modelStorage, $modelsAtPath, $idsAtPath): void { |
|
| 692 | + $registerModelAtRoot = function($model) use ($modelStorage, $modelsAtPath, $idsAtPath): void { |
|
| 693 | 693 | self::registerModelAtPath( |
| 694 | 694 | $model, |
| 695 | 695 | static::ROOT_PATH, |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | assert(is_string($pathPiece)); |
| 778 | 778 | $parent = $tmpPath; |
| 779 | 779 | $tmpPath = empty($tmpPath) === true ? |
| 780 | - $pathPiece : $tmpPath . static::PATH_SEPARATOR . $pathPiece; |
|
| 780 | + $pathPiece : $tmpPath.static::PATH_SEPARATOR.$pathPiece; |
|
| 781 | 781 | $normalizedPaths[$tmpPath] = [$parent, $pathPiece]; |
| 782 | 782 | $pathsDepths[$parent] = $parentDepth++; |
| 783 | 783 | } |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | ): ModelQueryBuilder { |
| 935 | 935 | assert( |
| 936 | 936 | $this->getModelSchemas()->hasRelationship($this->getModelClass(), $relationshipName), |
| 937 | - "Relationship `$relationshipName` do not exist in model `" . $this->getModelClass() . '`' |
|
| 937 | + "Relationship `$relationshipName` do not exist in model `".$this->getModelClass().'`' |
|
| 938 | 938 | ); |
| 939 | 939 | |
| 940 | 940 | // as we read data from a relationship our main table and model would be the table/model in the relationship |
@@ -953,8 +953,7 @@ discard block |
||
| 953 | 953 | $filters = $this->getFilters(); |
| 954 | 954 | $sorts = $this->getSorts(); |
| 955 | 955 | $this->areFiltersWithAnd() ? |
| 956 | - $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) : |
|
| 957 | - $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts); |
|
| 956 | + $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) : $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts); |
|
| 958 | 957 | } |
| 959 | 958 | // ... and the input filters to actual data we select |
| 960 | 959 | if ($relationshipFilters !== null) { |
@@ -982,7 +981,7 @@ discard block |
||
| 982 | 981 | ) { |
| 983 | 982 | assert( |
| 984 | 983 | $this->getModelSchemas()->hasRelationship($this->getModelClass(), $name), |
| 985 | - "Relationship `$name` do not exist in model `" . $this->getModelClass() . '`' |
|
| 984 | + "Relationship `$name` do not exist in model `".$this->getModelClass().'`' |
|
| 986 | 985 | ); |
| 987 | 986 | |
| 988 | 987 | // depending on the relationship type we expect the result to be either single resource or a collection |
@@ -1009,7 +1008,7 @@ discard block |
||
| 1009 | 1008 | ): array { |
| 1010 | 1009 | assert( |
| 1011 | 1010 | $this->getModelSchemas()->hasRelationship($this->getModelClass(), $name), |
| 1012 | - "Relationship `$name` do not exist in model `" . $this->getModelClass() . '`' |
|
| 1011 | + "Relationship `$name` do not exist in model `".$this->getModelClass().'`' |
|
| 1013 | 1012 | ); |
| 1014 | 1013 | |
| 1015 | 1014 | // depending on the relationship type we expect the result to be either single resource or a collection |
@@ -1083,7 +1082,7 @@ discard block |
||
| 1083 | 1082 | |
| 1084 | 1083 | $this->clearFetchParameters(); |
| 1085 | 1084 | |
| 1086 | - return (int)$deleted; |
|
| 1085 | + return (int) $deleted; |
|
| 1087 | 1086 | } |
| 1088 | 1087 | |
| 1089 | 1088 | /** |
@@ -1097,7 +1096,7 @@ discard block |
||
| 1097 | 1096 | |
| 1098 | 1097 | $this->clearFetchParameters(); |
| 1099 | 1098 | |
| 1100 | - return (int)$deleted > 0; |
|
| 1099 | + return (int) $deleted > 0; |
|
| 1101 | 1100 | } |
| 1102 | 1101 | |
| 1103 | 1102 | /** |
@@ -1118,7 +1117,7 @@ discard block |
||
| 1118 | 1117 | |
| 1119 | 1118 | $this->clearBuilderParameters()->clearFetchParameters(); |
| 1120 | 1119 | |
| 1121 | - $this->inTransaction(function () use ($saveMain, $toMany, &$index) { |
|
| 1120 | + $this->inTransaction(function() use ($saveMain, $toMany, &$index) { |
|
| 1122 | 1121 | $saveMain->execute(); |
| 1123 | 1122 | |
| 1124 | 1123 | // if no index given will use last insert ID as index |
@@ -1134,7 +1133,7 @@ discard block |
||
| 1134 | 1133 | ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName) |
| 1135 | 1134 | ); |
| 1136 | 1135 | foreach ($secondaryIds as $secondaryId) { |
| 1137 | - $inserted += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
| 1136 | + $inserted += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
| 1138 | 1137 | } |
| 1139 | 1138 | } |
| 1140 | 1139 | }); |
@@ -1163,12 +1162,12 @@ discard block |
||
| 1163 | 1162 | ->createBuilder($this->getModelClass()) |
| 1164 | 1163 | ->updateModels($allowedChanges) |
| 1165 | 1164 | ->addFiltersWithAndToTable($filters); |
| 1166 | - $saveMain = $this->builderSaveResourceOnUpdate($saveMain); |
|
| 1165 | + $saveMain = $this->builderSaveResourceOnUpdate($saveMain); |
|
| 1167 | 1166 | $saveMain->getSQL(); // prepare |
| 1168 | 1167 | |
| 1169 | 1168 | $this->clearBuilderParameters()->clearFetchParameters(); |
| 1170 | 1169 | |
| 1171 | - $this->inTransaction(function () use ($saveMain, $toMany, $index, &$updated) { |
|
| 1170 | + $this->inTransaction(function() use ($saveMain, $toMany, $index, &$updated) { |
|
| 1172 | 1171 | $updated = $saveMain->execute(); |
| 1173 | 1172 | |
| 1174 | 1173 | foreach ($toMany as $relationshipName => $secondaryIds) { |
@@ -1188,12 +1187,12 @@ discard block |
||
| 1188 | 1187 | ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName) |
| 1189 | 1188 | ); |
| 1190 | 1189 | foreach ($secondaryIds as $secondaryId) { |
| 1191 | - $updated += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
| 1190 | + $updated += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
| 1192 | 1191 | } |
| 1193 | 1192 | } |
| 1194 | 1193 | }); |
| 1195 | 1194 | |
| 1196 | - return (int)$updated; |
|
| 1195 | + return (int) $updated; |
|
| 1197 | 1196 | } |
| 1198 | 1197 | |
| 1199 | 1198 | /** |
@@ -1344,7 +1343,7 @@ discard block |
||
| 1344 | 1343 | { |
| 1345 | 1344 | $countBuilder = $this->createBuilder($this->getModelClass()); |
| 1346 | 1345 | $countBuilder->setParameters($builder->getParameters()); |
| 1347 | - $countBuilder->select('COUNT(*)')->from('(' . $builder->getSQL() . ') AS RESULT'); |
|
| 1346 | + $countBuilder->select('COUNT(*)')->from('('.$builder->getSQL().') AS RESULT'); |
|
| 1348 | 1347 | |
| 1349 | 1348 | return $countBuilder; |
| 1350 | 1349 | } |
@@ -1555,7 +1554,7 @@ discard block |
||
| 1555 | 1554 | |
| 1556 | 1555 | $pkName = $this->getModelSchemas()->getPrimaryKey($parentClass); |
| 1557 | 1556 | |
| 1558 | - $registerModelAtPath = function ($model, string $path) use ($deDup, $modelsAtPath, $idsAtPath) { |
|
| 1557 | + $registerModelAtPath = function($model, string $path) use ($deDup, $modelsAtPath, $idsAtPath) { |
|
| 1559 | 1558 | return self::registerModelAtPath( |
| 1560 | 1559 | $model, |
| 1561 | 1560 | $path, |
@@ -1567,7 +1566,7 @@ discard block |
||
| 1567 | 1566 | }; |
| 1568 | 1567 | |
| 1569 | 1568 | foreach ($childRelationships as $name) { |
| 1570 | - $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath . static::PATH_SEPARATOR . $name : $name; |
|
| 1569 | + $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath.static::PATH_SEPARATOR.$name : $name; |
|
| 1571 | 1570 | |
| 1572 | 1571 | $relationshipType = $this->getModelSchemas()->getRelationshipType($parentClass, $name); |
| 1573 | 1572 | list ($targetModelClass, $reverseRelName) = |
@@ -1617,7 +1616,7 @@ discard block |
||
| 1617 | 1616 | [$pkName => [FilterParameterInterface::OPERATION_EQUALS => [$parent->{$pkName}]]], |
| 1618 | 1617 | [] |
| 1619 | 1618 | ); |
| 1620 | - $children = $this->fetchPaginatedResourcesWithoutRelationships( |
|
| 1619 | + $children = $this->fetchPaginatedResourcesWithoutRelationships( |
|
| 1621 | 1620 | $clonedBuilder, |
| 1622 | 1621 | $clonedBuilder->getModelClass() |
| 1623 | 1622 | ); |
@@ -48,18 +48,18 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $container[FactoryInterface::class] = $factory; |
| 50 | 50 | |
| 51 | - $container[JsonSchemasInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
| 51 | + $container[JsonSchemasInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
| 52 | 52 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
| 53 | 53 | $modelSchemas = $container->get(ModelSchemaInfoInterface::class); |
| 54 | 54 | |
| 55 | 55 | return $factory->createJsonSchemas($settings[FluteSettings::KEY_MODEL_TO_SCHEMA_MAP], $modelSchemas); |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | - $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) { |
|
| 58 | + $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) { |
|
| 59 | 59 | return new ParametersMapper($container->get(JsonSchemasInterface::class)); |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | - $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) { |
|
| 62 | + $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) { |
|
| 63 | 63 | /** @var JsonSchemasInterface $jsonSchemas */ |
| 64 | 64 | $jsonSchemas = $container->get(JsonSchemasInterface::class); |
| 65 | 65 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
@@ -74,19 +74,19 @@ discard block |
||
| 74 | 74 | return $encoder; |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | - $container[RelationshipPaginationStrategyInterface::class] = function (PsrContainerInterface $container) { |
|
| 77 | + $container[RelationshipPaginationStrategyInterface::class] = function(PsrContainerInterface $container) { |
|
| 78 | 78 | $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class); |
| 79 | 79 | |
| 80 | 80 | return new BasicRelationshipPaginationStrategy($settings[FluteSettings::KEY_DEFAULT_PAGING_SIZE]); |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | - $container[JsonApiParserFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
| 83 | + $container[JsonApiParserFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
| 84 | 84 | $factory = new JsonApiParserFactory($container); |
| 85 | 85 | |
| 86 | 86 | return $factory; |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | - $container[FormValidatorFactoryInterface::class] = function (PsrContainerInterface $container) { |
|
| 89 | + $container[FormValidatorFactoryInterface::class] = function(PsrContainerInterface $container) { |
|
| 90 | 90 | $factory = new FormValidatorFactory($container); |
| 91 | 91 | |
| 92 | 92 | return $factory; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public static function configureExceptionHandler(LimoncelloContainerInterface $container) |
| 106 | 106 | { |
| 107 | - $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) { |
|
| 107 | + $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) { |
|
| 108 | 108 | /** @var CacheSettingsProviderInterface $provider */ |
| 109 | 109 | $provider = $container->get(CacheSettingsProviderInterface::class); |
| 110 | 110 | $appConfig = $provider->getApplicationConfiguration(); |
@@ -111,10 +111,10 @@ |
||
| 111 | 111 | ); |
| 112 | 112 | assert(empty($jsonQueryValFileMask) === false, "Invalid Query Validators file mask `$jsonQueryValFileMask`."); |
| 113 | 113 | |
| 114 | - $schemasPath = $schemasFolder . DIRECTORY_SEPARATOR . $schemasFileMask; |
|
| 115 | - $jsonDataValPath = $jsonDataValFolder . DIRECTORY_SEPARATOR . $jsonDataValFileMask; |
|
| 116 | - $formsValidatorsPath = $formsValFolder . DIRECTORY_SEPARATOR . $formsValFileMask; |
|
| 117 | - $jsonQueryValPath = $jsonQueryValFolder . DIRECTORY_SEPARATOR . $jsonQueryValFileMask; |
|
| 114 | + $schemasPath = $schemasFolder.DIRECTORY_SEPARATOR.$schemasFileMask; |
|
| 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 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | static::assertClassValueDefined(static::SCHEMA_CLASS); |
| 209 | 209 | |
| 210 | 210 | $api = static::defaultCreateApi($container, static::API_CLASS); |
| 211 | - $handler = function () use ($api, $index, $modelRelName) { |
|
| 211 | + $handler = function() use ($api, $index, $modelRelName) { |
|
| 212 | 212 | return $api->readRelationship($index, $modelRelName); |
| 213 | 213 | }; |
| 214 | 214 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | static::assertClassValueDefined(static::SCHEMA_CLASS); |
| 249 | 249 | |
| 250 | 250 | $api = static::defaultCreateApi($container, static::API_CLASS); |
| 251 | - $handler = function () use ($api, $index, $modelRelName) { |
|
| 251 | + $handler = function() use ($api, $index, $modelRelName) { |
|
| 252 | 252 | return $api->readRelationship($index, $modelRelName); |
| 253 | 253 | }; |
| 254 | 254 | |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | assert(class_exists($controllerClass) === true); |
| 49 | 49 | |
| 50 | 50 | $groupPrefix = $group->getUriPrefix(); |
| 51 | - $indexSlug = '/{' . JCI::ROUTE_KEY_INDEX . '}'; |
|
| 52 | - $params = function (string $method) use ($groupPrefix, $resourceName): array { |
|
| 51 | + $indexSlug = '/{'.JCI::ROUTE_KEY_INDEX.'}'; |
|
| 52 | + $params = function(string $method) use ($groupPrefix, $resourceName): array { |
|
| 53 | 53 | return [RouteInterface::PARAM_NAME => static::routeName($groupPrefix, $resourceName, $method)]; |
| 54 | 54 | }; |
| 55 | - $handler = function (string $method) use ($controllerClass): array { |
|
| 55 | + $handler = function(string $method) use ($controllerClass): array { |
|
| 56 | 56 | return [$controllerClass, $method]; |
| 57 | 57 | }; |
| 58 | 58 | |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | $group->post($resourceName, $handler(JCI::METHOD_CREATE), $params(JCI::METHOD_CREATE)); |
| 66 | 66 | } |
| 67 | 67 | if (in_array(ControllerReadInterface::class, $classInterfaces) === true) { |
| 68 | - $group->get($resourceName . $indexSlug, $handler(JCI::METHOD_READ), $params(JCI::METHOD_READ)); |
|
| 68 | + $group->get($resourceName.$indexSlug, $handler(JCI::METHOD_READ), $params(JCI::METHOD_READ)); |
|
| 69 | 69 | } |
| 70 | 70 | if (in_array(ControllerUpdateInterface::class, $classInterfaces) === true) { |
| 71 | - $group->patch($resourceName . $indexSlug, $handler(JCI::METHOD_UPDATE), $params(JCI::METHOD_UPDATE)); |
|
| 71 | + $group->patch($resourceName.$indexSlug, $handler(JCI::METHOD_UPDATE), $params(JCI::METHOD_UPDATE)); |
|
| 72 | 72 | } |
| 73 | 73 | if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 74 | - $group->delete($resourceName . $indexSlug, $handler(JCI::METHOD_DELETE), $params(JCI::METHOD_DELETE)); |
|
| 74 | + $group->delete($resourceName.$indexSlug, $handler(JCI::METHOD_DELETE), $params(JCI::METHOD_DELETE)); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return $group; |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $groupPrefix = $group->getUriPrefix(); |
| 100 | - $slugged = $subUri . '/{' . FCI::ROUTE_KEY_INDEX . '}'; |
|
| 101 | - $params = function (string $method) use ($groupPrefix, $subUri) : array { |
|
| 100 | + $slugged = $subUri.'/{'.FCI::ROUTE_KEY_INDEX.'}'; |
|
| 101 | + $params = function(string $method) use ($groupPrefix, $subUri) : array { |
|
| 102 | 102 | return [RouteInterface::PARAM_NAME => static::routeName($groupPrefix, $subUri, $method)]; |
| 103 | 103 | }; |
| 104 | - $handler = function (string $method) use ($controllerClass): array { |
|
| 104 | + $handler = function(string $method) use ($controllerClass): array { |
|
| 105 | 105 | return [$controllerClass, $method]; |
| 106 | 106 | }; |
| 107 | 107 | |
@@ -112,10 +112,10 @@ discard block |
||
| 112 | 112 | $group->get($subUri, $handler(FCI::METHOD_INDEX), $params(FCI::METHOD_INDEX)); |
| 113 | 113 | } |
| 114 | 114 | if (in_array(ControllerInstanceInterface::class, $classInterfaces) === true) { |
| 115 | - $group->get($subUri . $createSubUrl, $handler(FCI::METHOD_INSTANCE), $params(FCI::METHOD_INSTANCE)); |
|
| 115 | + $group->get($subUri.$createSubUrl, $handler(FCI::METHOD_INSTANCE), $params(FCI::METHOD_INSTANCE)); |
|
| 116 | 116 | } |
| 117 | 117 | if (in_array(ControllerCreateInterface::class, $classInterfaces) === true) { |
| 118 | - $group->post($subUri . $createSubUrl, $handler(FCI::METHOD_CREATE), $params(FCI::METHOD_CREATE)); |
|
| 118 | + $group->post($subUri.$createSubUrl, $handler(FCI::METHOD_CREATE), $params(FCI::METHOD_CREATE)); |
|
| 119 | 119 | } |
| 120 | 120 | if (in_array(ControllerReadInterface::class, $classInterfaces) === true) { |
| 121 | 121 | $group->get($slugged, $handler(FCI::METHOD_READ), $params(FCI::METHOD_READ)); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $group->post($slugged, $handler(FCI::METHOD_UPDATE), $params(FCI::METHOD_UPDATE)); |
| 125 | 125 | } |
| 126 | 126 | if (in_array(ControllerDeleteInterface::class, $classInterfaces) === true) { |
| 127 | - $deleteUri = $slugged . '/' . FCI::METHOD_DELETE; |
|
| 127 | + $deleteUri = $slugged.'/'.FCI::METHOD_DELETE; |
|
| 128 | 128 | $group->post($deleteUri, $handler(FCI::METHOD_DELETE), $params(FCI::METHOD_DELETE)); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -150,14 +150,14 @@ discard block |
||
| 150 | 150 | /** @var string $controllerClass */ |
| 151 | 151 | /** @var string $schemaClass */ |
| 152 | 152 | |
| 153 | - $resourceIdUri = $resourceName . '/{' . JCI::ROUTE_KEY_INDEX . '}/'; |
|
| 154 | - $selfUri = $resourceIdUri . DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $relationshipName; |
|
| 153 | + $resourceIdUri = $resourceName.'/{'.JCI::ROUTE_KEY_INDEX.'}/'; |
|
| 154 | + $selfUri = $resourceIdUri.DocumentInterface::KEYWORD_RELATIONSHIPS.'/'.$relationshipName; |
|
| 155 | 155 | |
| 156 | 156 | return $group |
| 157 | 157 | // `self` |
| 158 | 158 | ->get($selfUri, [$controllerClass, $selfGetMethod]) |
| 159 | 159 | // `related` |
| 160 | - ->get($resourceIdUri . $relationshipName, [$controllerClass, $selfGetMethod]); |
|
| 160 | + ->get($resourceIdUri.$relationshipName, [$controllerClass, $selfGetMethod]); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -181,6 +181,6 @@ discard block |
||
| 181 | 181 | $subUri = substr($subUri, 0, -1); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - return $prefix . $subUri . '::' . $method; |
|
| 184 | + return $prefix.$subUri.'::'.$method; |
|
| 185 | 185 | } |
| 186 | 186 | } |