Skip to content

add @throws declarations to docs in Connection #2810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ public function getEventManager()
* Gets the DatabasePlatform for the connection.
*
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
*
* @throws \Doctrine\DBAL\DBALException
*/
public function getDatabasePlatform()
{
Expand Down Expand Up @@ -410,6 +412,8 @@ private function detectDatabasePlatform()
* version without having to query it (performance reasons).
*
* @return string|null
*
* @throws \Exception
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception is already imported

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Fixed.

*/
private function getDatabasePlatformVersion()
{
Expand Down Expand Up @@ -545,6 +549,8 @@ public function setFetchMode($fetchMode)
* @param array $types The query parameter types.
*
* @return array|bool False is returned if no rows are found.
*
* @throws \Doctrine\DBAL\DBALException
*/
public function fetchAssoc($statement, array $params = array(), array $types = array())
{
Expand Down Expand Up @@ -576,6 +582,8 @@ public function fetchArray($statement, array $params = array(), array $types = a
* @param array $types The query parameter types.
*
* @return mixed|bool False is returned if no rows are found.
*
* @throws \Doctrine\DBAL\DBALException
*/
public function fetchColumn($statement, array $params = array(), $column = 0, array $types = array())
{
Expand Down Expand Up @@ -643,6 +651,7 @@ private function gatherConditions(array $identifiers)
*
* @return integer The number of affected rows.
*
* @throws \Doctrine\DBAL\DBALException
* @throws InvalidArgumentException
*/
public function delete($tableExpression, array $identifier, array $types = array())
Expand Down Expand Up @@ -711,6 +720,8 @@ public function getTransactionIsolation()
* @param array $types Types of the merged $data and $identifier arrays in that order.
*
* @return integer The number of affected rows.
*
* @throws \Doctrine\DBAL\DBALException
*/
public function update($tableExpression, array $data, array $identifier, array $types = array())
{
Expand Down Expand Up @@ -748,6 +759,8 @@ public function update($tableExpression, array $data, array $identifier, array $
* @param array $types Types of the inserted data.
*
* @return integer The number of affected rows.
*
* @throws \Doctrine\DBAL\DBALException
*/
public function insert($tableExpression, array $data, array $types = array())
{
Expand Down Expand Up @@ -1165,7 +1178,8 @@ public function lastInsertId($seqName = null)
*
* @return mixed The value returned by $func
*
* @throws \Exception
* @throws Exception
* @throws Throwable
*/
public function transactional(Closure $func)
{
Expand Down