Skip to content

Commit 855a047

Browse files
committed
Tweak the code to avoid fabbot false positives
1 parent 9c93a3b commit 855a047

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

HttpFoundation/DbalSessionHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function destroy($sessionId)
9696
$stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR);
9797
$stmt->execute();
9898
} catch (\Exception $e) {
99-
throw new \RuntimeException(sprintf('Exception was thrown when trying to delete a session: %s.', $e->getMessage()), 0, $e);
99+
throw new \RuntimeException('Exception was thrown when trying to delete a session: '.$e->getMessage(), 0, $e);
100100
}
101101

102102
return true;
@@ -115,7 +115,7 @@ public function gc($maxlifetime)
115115
$stmt->bindValue(':time', time() - $maxlifetime, \PDO::PARAM_INT);
116116
$stmt->execute();
117117
} catch (\Exception $e) {
118-
throw new \RuntimeException(sprintf('Exception was thrown when trying to delete expired sessions: %s.', $e->getMessage()), 0, $e);
118+
throw new \RuntimeException('Exception was thrown when trying to delete expired sessions: '.$e->getMessage(), 0, $e);
119119
}
120120

121121
return true;
@@ -142,7 +142,7 @@ public function read($sessionId)
142142

143143
return '';
144144
} catch (\Exception $e) {
145-
throw new \RuntimeException(sprintf('Exception was thrown when trying to read the session data: %s.', $e->getMessage()), 0, $e);
145+
throw new \RuntimeException('Exception was thrown when trying to read the session data: '.$e->getMessage(), 0, $e);
146146
}
147147
}
148148

@@ -212,7 +212,7 @@ public function write($sessionId, $data)
212212
}
213213
}
214214
} catch (\Exception $e) {
215-
throw new \RuntimeException(sprintf('Exception was thrown when trying to write the session data: %s.', $e->getMessage()), 0, $e);
215+
throw new \RuntimeException('Exception was thrown when trying to write the session data: '.$e->getMessage(), 0, $e);
216216
}
217217

218218
return true;

Security/User/EntityUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function refreshUser(UserInterface $user)
9292

9393
$refreshedUser = $repository->find($id);
9494
if (null === $refreshedUser) {
95-
throw new UsernameNotFoundException(sprintf('User with id %s not found.', json_encode($id)));
95+
throw new UsernameNotFoundException('User with id '.json_encode($id).' not found.'));
9696
}
9797
}
9898

0 commit comments

Comments
 (0)