From 18a62d3b042c0045410d18ed38e58d282b923647 Mon Sep 17 00:00:00 2001 From: kingjia90 Date: Tue, 10 Dec 2024 09:36:46 +0000 Subject: [PATCH] Apply php-cs-fixer changes --- src/Helper/GridHelperService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Helper/GridHelperService.php b/src/Helper/GridHelperService.php index 1e2ce8802..45ae42b87 100644 --- a/src/Helper/GridHelperService.php +++ b/src/Helper/GridHelperService.php @@ -949,7 +949,7 @@ private function optimizedConcatNotLike(string $fullpath, bool $onlyChildren = f $leaf = array_pop($pathParts); $path = implode('/', $pathParts); - if ($onlyChildren){ + if ($onlyChildren) { return '`path` NOT LIKE "' . $fullpath . '/%"'; } @@ -979,20 +979,20 @@ protected function getPermittedPathsByUser(string $type, User $user): string $exceptions = ''; if ($allowedPaths) { $exceptionsConcat = ''; - foreach ($allowedPaths as $path){ + foreach ($allowedPaths as $path) { if ($exceptionsConcat !== '') { $exceptionsConcat.= ' OR '; } $exceptionsConcat.= $this->optimizedConcatLike($path); } - $exceptions = " OR (" . $exceptionsConcat . ")"; + $exceptions = ' OR (' . $exceptionsConcat . ')'; //if any allowed child is found, the current folder can be listed but its content is still blocked $onlyChildren = true; } $forbiddenPathSql[] = $this->optimizedConcatNotLike($forbiddenPath, $onlyChildren) . $exceptions; } foreach ($elementPaths['allowed'] as $allowedPaths) { - $allowedPathSql[] = $this->optimizedConcatLike($allowedPaths ); + $allowedPathSql[] = $this->optimizedConcatLike($allowedPaths); } // this is to avoid query error when implode is empty.