File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,6 @@ class AuthCodeManager extends BaseAuthCodeManager
22
22
*/
23
23
protected $ em ;
24
24
25
- /**
26
- * @var \Doctrine\ORM\EntityRepository
27
- */
28
- protected $ repository ;
29
-
30
25
/**
31
26
* @var string
32
27
*/
@@ -39,7 +34,6 @@ class AuthCodeManager extends BaseAuthCodeManager
39
34
public function __construct (EntityManager $ em , $ class )
40
35
{
41
36
$ this ->em = $ em ;
42
- $ this ->repository = $ em ->getRepository ($ class );
43
37
$ this ->class = $ class ;
44
38
}
45
39
@@ -56,7 +50,7 @@ public function getClass()
56
50
*/
57
51
public function findAuthCodeBy (array $ criteria )
58
52
{
59
- return $ this ->repository ->findOneBy ($ criteria );
53
+ return $ this ->em -> getRepository ( $ this -> class ) ->findOneBy ($ criteria );
60
54
}
61
55
62
56
/**
@@ -82,7 +76,7 @@ public function deleteAuthCode(AuthCodeInterface $authCode)
82
76
*/
83
77
public function deleteExpired ()
84
78
{
85
- $ qb = $ this ->repository ->createQueryBuilder ('a ' );
79
+ $ qb = $ this ->em -> getRepository ( $ this -> class ) ->createQueryBuilder ('a ' );
86
80
$ qb
87
81
->delete ()
88
82
->where ('a.expiresAt < ?1 ' )
You can’t perform that action at this time.
0 commit comments