Skip to content

Commit f361f9b

Browse files
committed
Fix PHPStan errors
1 parent 878f4d9 commit f361f9b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/TwigHooks/src/Twig/Runtime/HooksRuntime.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ private function formatBaseString(string $base): string
5151
foreach ($parts as $part) {
5252
$resultPart = trim($part, '_');
5353
$resultPart = str_replace(['@', '.html.twig'], '', $resultPart);
54-
$resultPart = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $resultPart));
54+
/** @var string $resultPart */
55+
$resultPart = preg_replace('/(?<!^)[A-Z]/', '_$0', $resultPart);
56+
$resultPart = strtolower($resultPart);
5557
$resultParts[] = $resultPart;
5658
}
5759

5860
return implode('.', $resultParts);
5961
}
6062

6163
/**
64+
* @param array<string, mixed> $context
65+
*
6266
* @return array<string, string>
6367
*/
6468
public function getHookableData(array $context): array
@@ -67,6 +71,8 @@ public function getHookableData(array $context): array
6771
}
6872

6973
/**
74+
* @param array<string, mixed> $context
75+
*
7076
* @return array<string, string>
7177
*/
7278
public function getHookableConfiguration(array $context): array

0 commit comments

Comments
 (0)