@@ -76,11 +76,7 @@ public function deleteTokenBySeries(string $series)
76
76
$ sql = 'DELETE FROM rememberme_token WHERE series=:series ' ;
77
77
$ paramValues = ['series ' => $ series ];
78
78
$ paramTypes = ['series ' => ParameterType::STRING ];
79
- if (method_exists ($ this ->conn , 'executeStatement ' )) {
80
- $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
81
- } else {
82
- $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
83
- }
79
+ $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
84
80
}
85
81
86
82
/**
@@ -101,11 +97,7 @@ public function updateToken(string $series, #[\SensitiveParameter] string $token
101
97
'lastUsed ' => Types::DATETIME_IMMUTABLE ,
102
98
'series ' => ParameterType::STRING ,
103
99
];
104
- if (method_exists ($ this ->conn , 'executeStatement ' )) {
105
- $ updated = $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
106
- } else {
107
- $ updated = $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
108
- }
100
+ $ updated = $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
109
101
if ($ updated < 1 ) {
110
102
throw new TokenNotFoundException ('No token found. ' );
111
103
}
@@ -131,11 +123,7 @@ public function createNewToken(PersistentTokenInterface $token)
131
123
'value ' => ParameterType::STRING ,
132
124
'lastUsed ' => Types::DATETIME_IMMUTABLE ,
133
125
];
134
- if (method_exists ($ this ->conn , 'executeStatement ' )) {
135
- $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
136
- } else {
137
- $ this ->conn ->executeUpdate ($ sql , $ paramValues , $ paramTypes );
138
- }
126
+ $ this ->conn ->executeStatement ($ sql , $ paramValues , $ paramTypes );
139
127
}
140
128
141
129
public function verifyToken (PersistentTokenInterface $ token , #[\SensitiveParameter] string $ tokenValue ): bool
0 commit comments