Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
loicsapone committed Mar 1, 2024
1 parent 65da1dd commit 3f70171
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: composer-require-checker

- name: Composer Unused
run: composer-unused --excludePackage=symfony/dependency-injection --excludePackage=symfony/property-access
run: composer-unused

php-cs-fixer:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/IframeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
) {
}

public function __invoke(Request $request, ?Profiler $profiler, Component $component = null): Response
public function __invoke(Request $request, ?Profiler $profiler, ?Component $component = null): Response
{
if ($profiler instanceof Profiler) {
$profiler->disable();
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/StoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(
) {
}

public function __invoke(Request $request, Component $component = null): Response
public function __invoke(Request $request, ?Component $component = null): Response
{
if (!$component instanceof Component) {
return new Response($this->twig->render('@IQ2iArqui/view/story.html.twig', [
Expand Down
2 changes: 1 addition & 1 deletion src/Dto/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function addChild(self|MenuItem $child): static

public function reorderChildren(): static
{
usort($this->children, static fn (Menu|MenuItem $itemA, Menu|MenuItem $itemB): int => strcmp($itemA->getLabel(), $itemB->getLabel()));
usort($this->children, static fn (Menu|MenuItem $itemA, Menu|MenuItem $itemB): int => strcmp((string) $itemA->getLabel(), (string) $itemB->getLabel()));

return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/ComponentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function createFromRequest(Request $request): ?Component
$componentName = $config['name'] ?? null;
if (null === $componentName) {
$componentName = pathinfo(str_replace('.yaml', '', (string) $componentPath), \PATHINFO_FILENAME);
$componentName = ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $componentName))));
$componentName = ucfirst(strtolower(trim((string) preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $componentName))));
}

$isComponent = false;
Expand Down Expand Up @@ -77,7 +77,7 @@ public function createFromRequest(Request $request): ?Component
foreach ($config['variants'] as $variantPath => $variantConfig) {
$variantName = $variantConfig['name'] ?? null;
if (null === $variantName) {
$variantName = ucfirst(strtolower(trim(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], (string) $variantPath))));
$variantName = ucfirst(strtolower(trim((string) preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], (string) $variantPath))));
}

$variant = new Variant($variantPath, $variantName);
Expand Down

0 comments on commit 3f70171

Please sign in to comment.