Skip to content

Commit

Permalink
fix(php): update conf
Browse files Browse the repository at this point in the history
  • Loading branch information
koromerzhin committed Sep 25, 2023
1 parent 7ba2909 commit dd33bd5
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 54 deletions.
2 changes: 1 addition & 1 deletion apps/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"league/oauth2-google": "4.0.*",
"league/oauth2-instagram": "3.1.*",
"league/oauth2-linkedin": "5.1.*",
"liip/imagine-bundle": "2.11.*",
"liip/imagine-bundle": "2.12.*",
"michaelkaefer/oauth2-amazon": "1.0.*",
"mmo/faker-images": "0.8.*",
"nelmio/cors-bundle": "2.3.*",
Expand Down
72 changes: 36 additions & 36 deletions apps/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions apps/src/Block/CustomBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Labstag\Interfaces\EntityFrontInterface;
use Labstag\Lib\BlockLib;
use Labstag\Repository\LayoutRepository;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;

class CustomBlock extends BlockLib implements BlockInterface
Expand All @@ -24,7 +23,7 @@ public function context(EntityBlockInterface $entityBlock, ?EntityFrontInterface
}

$paragraphs = $this->setParagraphs($entityBlock);
$redirect = $this->setRedirect($paragraphs);
$redirect = $this->setRedirect($paragraphs);

if (!is_null($redirect)) {
return $redirect;
Expand Down
1 change: 0 additions & 1 deletion apps/src/Block/ParagraphBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Labstag\Interfaces\EntityBlockInterface;
use Labstag\Interfaces\EntityFrontInterface;
use Labstag\Lib\BlockLib;
use Symfony\Component\HttpFoundation\RedirectResponse;

class ParagraphBlock extends BlockLib implements BlockInterface
{
Expand Down
28 changes: 14 additions & 14 deletions apps/src/Lib/BlockLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,34 +153,34 @@ protected function getTemplateFile(string $type): string
return $data['view'];
}

protected function setRedirect(array $paragraphs): mixed
protected function launchParagraphs(array $paragraphs): array
{
$redirect = null;
foreach ($paragraphs as $paragraphs) {
if (!$paragraphs['args']['parameters'] instanceof RedirectResponse) {
foreach ($paragraphs as $position => $row) {
if ($row['args']['parameters'] instanceof RedirectResponse) {
continue;
}

$redirect = $paragraphs['args']['parameters'];

break;
$content = call_user_func_array([$row['class'], $row['execute']], $row['args']);
$paragraphs[$position]['data'] = $content;
}

return $redirect;
return $paragraphs;
}

protected function launchParagraphs(array $paragraphs): array
protected function setRedirect(array $paragraphs): mixed
{
foreach ($paragraphs as $position => $row) {
if ($row['args']['parameters'] instanceof RedirectResponse) {
$redirect = null;
foreach ($paragraphs as $paragraph) {
if (!$paragraph['args']['parameters'] instanceof RedirectResponse) {
continue;
}

$content = call_user_func_array([$row['class'], $row['execute']], $row['args']);
$paragraphs[$position]['data'] = $content;
$redirect = $paragraph['args']['parameters'];

break;
}

return $paragraphs;
return $redirect;
}

protected function showTemplateFile(string $type): array
Expand Down

0 comments on commit dd33bd5

Please sign in to comment.