@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * |
169 | 169 | * @param array $ruleIndexes |
170 | 170 | * |
171 | - * @return array |
|
171 | + * @return integer[] |
|
172 | 172 | */ |
173 | 173 | public static function readRuleStartIndexes(array $ruleIndexes): array; |
174 | 174 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @param array $ruleIndexes |
179 | 179 | * |
180 | - * @return array |
|
180 | + * @return integer[] |
|
181 | 181 | */ |
182 | 182 | public static function readRuleEndIndexes(array $ruleIndexes): array; |
183 | 183 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | |
381 | 381 | /** |
382 | - * @return iterable |
|
382 | + * @return Generator |
|
383 | 383 | * |
384 | 384 | * @SuppressWarnings(PHPMD.ElseExpression) |
385 | 385 | */ |
@@ -421,9 +421,9 @@ discard block |
||
421 | 421 | } |
422 | 422 | |
423 | 423 | /** |
424 | - * @param iterable $fieldsFromParent |
|
424 | + * @param Generator $fieldsFromParent |
|
425 | 425 | * |
426 | - * @return iterable |
|
426 | + * @return Generator |
|
427 | 427 | * |
428 | 428 | * @SuppressWarnings(PHPMD.StaticAccess) |
429 | 429 | * @SuppressWarnings(PHPMD.ElseExpression) |
@@ -456,9 +456,9 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | /** |
459 | - * @param iterable $sortsFromParent |
|
459 | + * @param Generator $sortsFromParent |
|
460 | 460 | * |
461 | - * @return iterable |
|
461 | + * @return Generator |
|
462 | 462 | * |
463 | 463 | * @SuppressWarnings(PHPMD.StaticAccess) |
464 | 464 | * @SuppressWarnings(PHPMD.ElseExpression) |
@@ -488,9 +488,9 @@ discard block |
||
488 | 488 | } |
489 | 489 | |
490 | 490 | /** |
491 | - * @param iterable $includesFromParent |
|
491 | + * @param Generator $includesFromParent |
|
492 | 492 | * |
493 | - * @return iterable |
|
493 | + * @return Generator |
|
494 | 494 | * |
495 | 495 | * @SuppressWarnings(PHPMD.StaticAccess) |
496 | 496 | * @SuppressWarnings(PHPMD.ElseExpression) |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | } |
521 | 521 | |
522 | 522 | /** |
523 | - * @param iterable $iterable |
|
523 | + * @param Generator $iterable |
|
524 | 524 | * |
525 | 525 | * @return array |
526 | 526 | */ |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | * @param int $ruleIndex |
684 | 684 | * @param iterable $values |
685 | 685 | * |
686 | - * @return iterable |
|
686 | + * @return Generator |
|
687 | 687 | */ |
688 | 688 | private function validateValues(int $ruleIndex, iterable $values): iterable |
689 | 689 | { |
@@ -698,9 +698,9 @@ discard block |
||
698 | 698 | |
699 | 699 | /** |
700 | 700 | * @param int $ruleIndex |
701 | - * @param iterable $opsAndArgs |
|
701 | + * @param Generator $opsAndArgs |
|
702 | 702 | * |
703 | - * @return iterable |
|
703 | + * @return Generator |
|
704 | 704 | */ |
705 | 705 | private function validateFilterArguments(int $ruleIndex, iterable $opsAndArgs): iterable |
706 | 706 | { |
@@ -858,7 +858,7 @@ discard block |
||
858 | 858 | * @param string $parameterName |
859 | 859 | * @param array $value |
860 | 860 | * |
861 | - * @return iterable |
|
861 | + * @return Generator |
|
862 | 862 | * |
863 | 863 | * @SuppressWarnings(PHPMD.ElseExpression) |
864 | 864 | */ |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | ) { |
156 | 156 | assert( |
157 | 157 | in_array(JsonApiQueryRulesSerializerInterface::class, class_implements($serializerClass)), |
158 | - "`$serializerClass` should implement interface `" . JsonApiQueryRulesSerializerInterface::class . '`.' |
|
158 | + "`$serializerClass` should implement interface `".JsonApiQueryRulesSerializerInterface::class.'`.' |
|
159 | 159 | ); |
160 | 160 | |
161 | 161 | $parameters = []; |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | { |
572 | 572 | // no validation rule means we should accept any input value |
573 | 573 | if ($ruleIndexes === null) { |
574 | - return is_numeric($value) === true ? (int)$value : 0; |
|
574 | + return is_numeric($value) === true ? (int) $value : 0; |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | $ruleIndex = $this->serializerClass::readRuleMainIndex($ruleIndexes); |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | |
583 | 583 | $validatedValue = $this->readSingleCapturedValue(); |
584 | 584 | |
585 | - return (int)$validatedValue; |
|
585 | + return (int) $validatedValue; |
|
586 | 586 | } |
587 | 587 | |
588 | 588 | /** |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | parse_str($this->getOriginalUri()->getQuery(), $queryParams); |
127 | 127 | |
128 | - return function ($offset) use ($pageSize, $queryParams) { |
|
128 | + return function($offset) use ($pageSize, $queryParams) { |
|
129 | 129 | $paramsWithPaging = array_merge($queryParams, [ |
130 | 130 | BaseQueryParserInterface::PARAM_PAGE => [ |
131 | 131 | JsonApiQueryValidatingParserInterface::PARAM_PAGING_OFFSET => $offset, |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | ], |
134 | 134 | ]); |
135 | 135 | $newUri = $this->getOriginalUri()->withQuery(http_build_query($paramsWithPaging)); |
136 | - $fullUrl = (string)$newUri; |
|
136 | + $fullUrl = (string) $newUri; |
|
137 | 137 | $link = $this->getFactory()->createLink($fullUrl, null, true); |
138 | 138 | |
139 | 139 | return $link; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | static::assertClassValueDefined(static::SCHEMA_CLASS); |
209 | 209 | |
210 | 210 | $api = static::createApi($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::createApi($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 |
@@ -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 | } |
@@ -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 | }; |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $classAtPath = new ArrayObject(); |
689 | 689 | $idsAtPath = new ArrayObject(); |
690 | 690 | |
691 | - $registerModelAtRoot = function ($model) use ($modelStorage, $modelsAtPath, $idsAtPath): void { |
|
691 | + $registerModelAtRoot = function($model) use ($modelStorage, $modelsAtPath, $idsAtPath): void { |
|
692 | 692 | self::registerModelAtPath( |
693 | 693 | $model, |
694 | 694 | static::ROOT_PATH, |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | assert(is_string($pathPiece)); |
777 | 777 | $parent = $tmpPath; |
778 | 778 | $tmpPath = empty($tmpPath) === true ? |
779 | - $pathPiece : $tmpPath . static::PATH_SEPARATOR . $pathPiece; |
|
779 | + $pathPiece : $tmpPath.static::PATH_SEPARATOR.$pathPiece; |
|
780 | 780 | $normalizedPaths[$tmpPath] = [$parent, $pathPiece]; |
781 | 781 | $pathsDepths[$parent] = $parentDepth++; |
782 | 782 | } |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | ): ModelQueryBuilder { |
934 | 934 | assert( |
935 | 935 | $this->getModelSchemes()->hasRelationship($this->getModelClass(), $relationshipName), |
936 | - "Relationship `$relationshipName` do not exist in model `" . $this->getModelClass() . '`' |
|
936 | + "Relationship `$relationshipName` do not exist in model `".$this->getModelClass().'`' |
|
937 | 937 | ); |
938 | 938 | |
939 | 939 | // as we read data from a relationship our main table and model would be the table/model in the relationship |
@@ -952,8 +952,7 @@ discard block |
||
952 | 952 | $filters = $this->getFilters(); |
953 | 953 | $sorts = $this->getSorts(); |
954 | 954 | $this->areFiltersWithAnd() ? |
955 | - $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) : |
|
956 | - $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts); |
|
955 | + $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) : $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts); |
|
957 | 956 | } |
958 | 957 | // ... and the input filters to actual data we select |
959 | 958 | if ($relationshipFilters !== null) { |
@@ -981,7 +980,7 @@ discard block |
||
981 | 980 | ) { |
982 | 981 | assert( |
983 | 982 | $this->getModelSchemes()->hasRelationship($this->getModelClass(), $name), |
984 | - "Relationship `$name` do not exist in model `" . $this->getModelClass() . '`' |
|
983 | + "Relationship `$name` do not exist in model `".$this->getModelClass().'`' |
|
985 | 984 | ); |
986 | 985 | |
987 | 986 | // depending on the relationship type we expect the result to be either single resource or a collection |
@@ -1008,7 +1007,7 @@ discard block |
||
1008 | 1007 | ): array { |
1009 | 1008 | assert( |
1010 | 1009 | $this->getModelSchemes()->hasRelationship($this->getModelClass(), $name), |
1011 | - "Relationship `$name` do not exist in model `" . $this->getModelClass() . '`' |
|
1010 | + "Relationship `$name` do not exist in model `".$this->getModelClass().'`' |
|
1012 | 1011 | ); |
1013 | 1012 | |
1014 | 1013 | // depending on the relationship type we expect the result to be either single resource or a collection |
@@ -1082,7 +1081,7 @@ discard block |
||
1082 | 1081 | |
1083 | 1082 | $this->clearFetchParameters(); |
1084 | 1083 | |
1085 | - return (int)$deleted; |
|
1084 | + return (int) $deleted; |
|
1086 | 1085 | } |
1087 | 1086 | |
1088 | 1087 | /** |
@@ -1096,7 +1095,7 @@ discard block |
||
1096 | 1095 | |
1097 | 1096 | $this->clearFetchParameters(); |
1098 | 1097 | |
1099 | - return (int)$deleted > 0; |
|
1098 | + return (int) $deleted > 0; |
|
1100 | 1099 | } |
1101 | 1100 | |
1102 | 1101 | /** |
@@ -1117,7 +1116,7 @@ discard block |
||
1117 | 1116 | |
1118 | 1117 | $this->clearBuilderParameters()->clearFetchParameters(); |
1119 | 1118 | |
1120 | - $this->inTransaction(function () use ($saveMain, $toMany, &$index) { |
|
1119 | + $this->inTransaction(function() use ($saveMain, $toMany, &$index) { |
|
1121 | 1120 | $saveMain->execute(); |
1122 | 1121 | |
1123 | 1122 | // if no index given will use last insert ID as index |
@@ -1133,7 +1132,7 @@ discard block |
||
1133 | 1132 | ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName) |
1134 | 1133 | ); |
1135 | 1134 | foreach ($secondaryIds as $secondaryId) { |
1136 | - $inserted += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
1135 | + $inserted += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
1137 | 1136 | } |
1138 | 1137 | } |
1139 | 1138 | }); |
@@ -1162,12 +1161,12 @@ discard block |
||
1162 | 1161 | ->createBuilder($this->getModelClass()) |
1163 | 1162 | ->updateModels($allowedChanges) |
1164 | 1163 | ->addFiltersWithAndToTable($filters); |
1165 | - $saveMain = $this->builderSaveResourceOnUpdate($saveMain); |
|
1164 | + $saveMain = $this->builderSaveResourceOnUpdate($saveMain); |
|
1166 | 1165 | $saveMain->getSQL(); // prepare |
1167 | 1166 | |
1168 | 1167 | $this->clearBuilderParameters()->clearFetchParameters(); |
1169 | 1168 | |
1170 | - $this->inTransaction(function () use ($saveMain, $toMany, $index, &$updated) { |
|
1169 | + $this->inTransaction(function() use ($saveMain, $toMany, $index, &$updated) { |
|
1171 | 1170 | $updated = $saveMain->execute(); |
1172 | 1171 | |
1173 | 1172 | foreach ($toMany as $relationshipName => $secondaryIds) { |
@@ -1187,12 +1186,12 @@ discard block |
||
1187 | 1186 | ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName) |
1188 | 1187 | ); |
1189 | 1188 | foreach ($secondaryIds as $secondaryId) { |
1190 | - $updated += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
1189 | + $updated += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute(); |
|
1191 | 1190 | } |
1192 | 1191 | } |
1193 | 1192 | }); |
1194 | 1193 | |
1195 | - return (int)$updated; |
|
1194 | + return (int) $updated; |
|
1196 | 1195 | } |
1197 | 1196 | |
1198 | 1197 | /** |
@@ -1343,7 +1342,7 @@ discard block |
||
1343 | 1342 | { |
1344 | 1343 | $countBuilder = $this->getConnection()->createQueryBuilder(); |
1345 | 1344 | $countBuilder->setParameters($builder->getParameters()); |
1346 | - $countBuilder->select('COUNT(*)')->from('(' . $builder->getSQL() . ') AS RESULT'); |
|
1345 | + $countBuilder->select('COUNT(*)')->from('('.$builder->getSQL().') AS RESULT'); |
|
1347 | 1346 | |
1348 | 1347 | return $countBuilder; |
1349 | 1348 | } |
@@ -1554,7 +1553,7 @@ discard block |
||
1554 | 1553 | |
1555 | 1554 | $pkName = $this->getModelSchemes()->getPrimaryKey($parentClass); |
1556 | 1555 | |
1557 | - $registerModelAtPath = function ($model, string $path) use ($deDup, $modelsAtPath, $idsAtPath) { |
|
1556 | + $registerModelAtPath = function($model, string $path) use ($deDup, $modelsAtPath, $idsAtPath) { |
|
1558 | 1557 | return self::registerModelAtPath( |
1559 | 1558 | $model, |
1560 | 1559 | $path, |
@@ -1566,7 +1565,7 @@ discard block |
||
1566 | 1565 | }; |
1567 | 1566 | |
1568 | 1567 | foreach ($childRelationships as $name) { |
1569 | - $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath . static::PATH_SEPARATOR . $name : $name; |
|
1568 | + $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath.static::PATH_SEPARATOR.$name : $name; |
|
1570 | 1569 | |
1571 | 1570 | $relationshipType = $this->getModelSchemes()->getRelationshipType($parentClass, $name); |
1572 | 1571 | list ($targetModelClass, $reverseRelName) = |
@@ -1616,7 +1615,7 @@ discard block |
||
1616 | 1615 | [$pkName => [FilterParameterInterface::OPERATION_EQUALS => [$parent->{$pkName}]]], |
1617 | 1616 | [] |
1618 | 1617 | ); |
1619 | - $children = $this->fetchPaginatedResourcesWithoutRelationships( |
|
1618 | + $children = $this->fetchPaginatedResourcesWithoutRelationships( |
|
1620 | 1619 | $clonedBuilder, |
1621 | 1620 | $clonedBuilder->getModelClass() |
1622 | 1621 | ); |