Skip to content

Commit 853ced3

Browse files
committed
Add missing dots at the end of exception messages
1 parent e818172 commit 853ced3

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function addTaggedSubscribers(ContainerBuilder $container)
6868
$connections = isset($tag['connection']) ? [$tag['connection']] : array_keys($this->connections);
6969
foreach ($connections as $con) {
7070
if (!isset($this->connections[$con])) {
71-
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s', $con, $id, implode(', ', array_keys($this->connections))));
71+
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s.', $con, $id, implode(', ', array_keys($this->connections))));
7272
}
7373

7474
$this->getEventManagerDef($container, $con)->addMethodCall('addEventSubscriber', [new Reference($id)]);
@@ -91,7 +91,7 @@ private function addTaggedListeners(ContainerBuilder $container)
9191
$connections = isset($tag['connection']) ? [$tag['connection']] : array_keys($this->connections);
9292
foreach ($connections as $con) {
9393
if (!isset($this->connections[$con])) {
94-
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s', $con, $id, implode(', ', array_keys($this->connections))));
94+
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s.', $con, $id, implode(', ', array_keys($this->connections))));
9595
}
9696

9797
if ($lazy = !empty($tag['lazy'])) {

DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function __construct($driver, array $namespaces, array $managerParameters
125125
$this->driverPattern = $driverPattern;
126126
$this->enabledParameter = $enabledParameter;
127127
if (\count($aliasMap) && (!$configurationPattern || !$registerAliasMethodName)) {
128-
throw new \InvalidArgumentException('configurationPattern and registerAliasMethodName are required to register namespace alias');
128+
throw new \InvalidArgumentException('configurationPattern and registerAliasMethodName are required to register namespace alias.');
129129
}
130130
$this->configurationPattern = $configurationPattern;
131131
$this->registerAliasMethodName = $registerAliasMethodName;
@@ -222,7 +222,7 @@ private function getManagerName(ContainerBuilder $container)
222222
}
223223
}
224224

225-
throw new InvalidArgumentException(sprintf('Could not find the manager name parameter in the container. Tried the following parameter names: "%s"', implode('", "', $this->managerParameters)));
225+
throw new InvalidArgumentException(sprintf('Could not find the manager name parameter in the container. Tried the following parameter names: "%s".', implode('", "', $this->managerParameters)));
226226
}
227227

228228
/**

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(sprintf('Exception was thrown when trying to delete a session: %s.', $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(sprintf('Exception was thrown when trying to delete expired sessions: %s.', $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(sprintf('Exception was thrown when trying to read the session data: %s.', $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(sprintf('Exception was thrown when trying to write the session data: %s.', $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(sprintf('User with id %s not found.', json_encode($id)));
9696
}
9797
}
9898

0 commit comments

Comments
 (0)