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

AddTokenResponseEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 2
1
<?php 
2
/*
3
 * This file is part of the GesdinetJWTRefreshTokenBundle package.
4
 *
5
 * (c) Gesdinet <http://www.gesdinet.com/>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Gesdinet\JWTRefreshTokenBundle\Event;
12
13
use Symfony\Component\HttpFoundation\Response;
14
use Symfony\Component\EventDispatcher\Event;
15
16
class AddTokenResponseEvent extends Event {
17
	private $data = [];
18
	public function __construct($token, Response $response){
19
		$this->token = $token;
0 ignored issues
show
Bug introduced by
The property token does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
20
		$this->response = $response;
0 ignored issues
show
Bug introduced by
The property response does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
21
	}
22
	public function getToken(){
23
		return $this->token;
24
	}
25
	public function getResponse(){
26
		return $this->response;
27
	}
28
	public function setData(array $data){
29
		$this->data = $data;
30
	}
31
	public function getData(){
32
		return $this->data;
33
	}
34
}