Skip to content

Commit ca8d920

Browse files
Merge branch '7.2' into 7.3
* 7.2: - - CS fixes
2 parents b7182ed + 972dd87 commit ca8d920

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

EventListener/IsCsrfTokenValidAttributeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function onKernelControllerArguments(ControllerArgumentsEvent $event): vo
4545

4646
foreach ($attributes as $attribute) {
4747
$id = $this->getTokenId($attribute->id, $request, $arguments);
48-
$methods = \array_map('strtoupper', (array) $attribute->methods);
48+
$methods = array_map('strtoupper', (array) $attribute->methods);
4949

5050
if ($methods && !\in_array($request->getMethod(), $methods, true)) {
5151
continue;

LoginLink/LoginLinkHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ public function consumeLoginLink(Request $request): UserInterface
8484
if (!$hash = $request->get('hash')) {
8585
throw new InvalidLoginLinkException('Missing "hash" parameter.');
8686
}
87-
if (!is_string($hash)) {
87+
if (!\is_string($hash)) {
8888
throw new InvalidLoginLinkException('Invalid "hash" parameter.');
8989
}
9090

9191
if (!$expires = $request->get('expires')) {
9292
throw new InvalidLoginLinkException('Missing "expires" parameter.');
9393
}
94-
if (preg_match('/^\d+$/', $expires) !== 1) {
94+
if (!preg_match('/^\d+$/', $expires)) {
9595
throw new InvalidLoginLinkException('Invalid "expires" parameter.');
9696
}
9797

Tests/FirewallTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ public function testListenersAreCalled()
104104
{
105105
$calledListeners = [];
106106

107-
$callableListener = static function() use(&$calledListeners) { $calledListeners[] = 'callableListener'; };
107+
$callableListener = static function () use (&$calledListeners) { $calledListeners[] = 'callableListener'; };
108108
$firewallListener = new class($calledListeners) implements FirewallListenerInterface {
109-
public function __construct(private array &$calledListeners) {}
109+
public function __construct(private array &$calledListeners)
110+
{
111+
}
110112

111113
public function supports(Request $request): ?bool
112114
{
@@ -124,7 +126,9 @@ public static function getPriority(): int
124126
}
125127
};
126128
$callableFirewallListener = new class($calledListeners) extends AbstractListener {
127-
public function __construct(private array &$calledListeners) {}
129+
public function __construct(private array &$calledListeners)
130+
{
131+
}
128132

129133
public function supports(Request $request): ?bool
130134
{

0 commit comments

Comments
 (0)