Skip to content

Commit ffbf31d

Browse files
committed
[SecurityBundle] Drop duplicated code
1 parent 8e0f0cc commit ffbf31d

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

src/Symfony/Bundle/SecurityBundle/Debug/TraceableListenerTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\SecurityBundle\Debug;
1313

1414
use Symfony\Component\Security\Http\Firewall\LegacyListenerTrait;
15+
use Symfony\Component\VarDumper\Caster\ClassStub;
1516

1617
/**
1718
* @author Robin Chalas <[email protected]>
@@ -39,4 +40,13 @@ public function getWrappedListener()
3940
{
4041
return $this->listener;
4142
}
43+
44+
public function getInfo(): array
45+
{
46+
return [
47+
'response' => $this->response,
48+
'time' => $this->time,
49+
'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener),
50+
];
51+
}
4252
}

src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\Security\Core\Exception\LazyResponseException;
1717
use Symfony\Component\Security\Http\Firewall\AbstractListener;
1818
use Symfony\Component\Security\Http\Firewall\ListenerInterface;
19-
use Symfony\Component\VarDumper\Caster\ClassStub;
2019

2120
/**
2221
* Wraps a lazy security listener.
@@ -60,13 +59,4 @@ public function authenticate(RequestEvent $event)
6059

6160
return $ret;
6261
}
63-
64-
public function getInfo(): array
65-
{
66-
return [
67-
'response' => $this->response,
68-
'time' => $this->time,
69-
'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener),
70-
];
71-
}
7262
}

src/Symfony/Bundle/SecurityBundle/Debug/WrappedListener.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\HttpKernel\Event\RequestEvent;
1515
use Symfony\Component\Security\Http\Firewall\ListenerInterface;
16-
use Symfony\Component\VarDumper\Caster\ClassStub;
1716

1817
/**
1918
* Wraps a security listener for calls record.
@@ -49,13 +48,4 @@ public function __invoke(RequestEvent $event)
4948
$this->time = microtime(true) - $startTime;
5049
$this->response = $event->getResponse();
5150
}
52-
53-
public function getInfo(): array
54-
{
55-
return [
56-
'response' => $this->response,
57-
'time' => $this->time,
58-
'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener),
59-
];
60-
}
6151
}

0 commit comments

Comments
 (0)