Test Failed
Pull Request — master (#62)
by
unknown
05:03
created

onAddToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the GesdinetJWTRefreshTokenBundle package.
5
 *
6
 * (c) Gesdinet <http://www.gesdinet.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gesdinet\JWTRefreshTokenBundle\EventListener\TokenSetter;
13
14
use Gesdinet\JWTRefreshTokenBundle\Event\AddTokenResponseEvent;
15
16
class ResponseHeaderTokenSetterEventListener {
17
	private $name;
18
	public function __construct($name){
19
		$this->name = $name;
20
	}
21
	public function onAddToken(AddTokenResponseEvent $event){
22
		$response = $event->getResponse();
23
		$token = $event->getToken();
24
		$response->headers->set($this->name, $token);
25
	}
26
}