Skip to content

Commit 33b5b64

Browse files
author
Roman Lytvynenko
committed
MC-36117: [GraphQL] - CMS Hierarchy child pages URL Key response
1 parent b48cf66 commit 33b5b64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/UrlRewriteGraphQl/Model/Resolver/EntityUrl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,14 @@ private function rewriteCustomUrls(UrlRewrite $finalUrlRewrite, int $storeId): ?
126126
* @param int $storeId
127127
* @param bool $findCustom
128128
* @return UrlRewrite|null
129+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
129130
*/
130131
private function findFinalUrl(string $requestPath, int $storeId, bool $findCustom = false): ?UrlRewrite
131132
{
132133
$urlRewrite = $this->findUrlFromRequestPath($requestPath, $storeId);
133134
if (empty($urlRewrite) && strpos($requestPath, '/') !== false) {
134135
//CMS hierarchy doesn't have their parents written into the url rewrites as they appear in hierarchy
136+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
135137
$urlRewrite = $this->findUrlFromRequestPath(basename($requestPath), $storeId);
136138
}
137139
if ($urlRewrite) {

0 commit comments

Comments
 (0)