Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
f440d92c
Unverified
Commit
f440d92c
authored
Dec 31, 2019
by
Luís Cobucci
Committed by
Sergei Morozov
Mar 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect interface's return type in methods
parent
ab88b960
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
ArrayStatement.php
lib/Doctrine/DBAL/Cache/ArrayStatement.php
+2
-0
DB2Connection.php
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
+16
-3
SQLAnywhereStatement.php
...Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php
+2
-0
SQLSrvConnection.php
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php
+6
-0
SQLSrvStatement.php
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
+6
-0
No files found.
lib/Doctrine/DBAL/Cache/ArrayStatement.php
View file @
f440d92c
...
@@ -46,6 +46,8 @@ class ArrayStatement implements IteratorAggregate, ResultStatement
...
@@ -46,6 +46,8 @@ class ArrayStatement implements IteratorAggregate, ResultStatement
public
function
closeCursor
()
public
function
closeCursor
()
{
{
unset
(
$this
->
data
);
unset
(
$this
->
data
);
return
true
;
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
View file @
f440d92c
...
@@ -8,6 +8,7 @@ use Doctrine\DBAL\ParameterType;
...
@@ -8,6 +8,7 @@ use Doctrine\DBAL\ParameterType;
use
stdClass
;
use
stdClass
;
use
const
DB2_AUTOCOMMIT_OFF
;
use
const
DB2_AUTOCOMMIT_OFF
;
use
const
DB2_AUTOCOMMIT_ON
;
use
const
DB2_AUTOCOMMIT_ON
;
use
function
assert
;
use
function
db2_autocommit
;
use
function
db2_autocommit
;
use
function
db2_commit
;
use
function
db2_commit
;
use
function
db2_conn_error
;
use
function
db2_conn_error
;
...
@@ -23,6 +24,7 @@ use function db2_rollback;
...
@@ -23,6 +24,7 @@ use function db2_rollback;
use
function
db2_server_info
;
use
function
db2_server_info
;
use
function
db2_stmt_errormsg
;
use
function
db2_stmt_errormsg
;
use
function
func_get_args
;
use
function
func_get_args
;
use
function
is_bool
;
class
DB2Connection
implements
Connection
,
ServerInfoAwareConnection
class
DB2Connection
implements
Connection
,
ServerInfoAwareConnection
{
{
...
@@ -140,7 +142,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
...
@@ -140,7 +142,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/
*/
public
function
beginTransaction
()
public
function
beginTransaction
()
{
{
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_OFF
);
$result
=
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_OFF
);
assert
(
is_bool
(
$result
));
return
$result
;
}
}
/**
/**
...
@@ -151,7 +156,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
...
@@ -151,7 +156,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
if
(
!
db2_commit
(
$this
->
conn
))
{
if
(
!
db2_commit
(
$this
->
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
}
}
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
$result
=
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
assert
(
is_bool
(
$result
));
return
$result
;
}
}
/**
/**
...
@@ -162,7 +171,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
...
@@ -162,7 +171,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
if
(
!
db2_rollback
(
$this
->
conn
))
{
if
(
!
db2_rollback
(
$this
->
conn
))
{
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
throw
new
DB2Exception
(
db2_conn_errormsg
(
$this
->
conn
));
}
}
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
$result
=
db2_autocommit
(
$this
->
conn
,
DB2_AUTOCOMMIT_ON
);
assert
(
is_bool
(
$result
));
return
$result
;
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php
View file @
f440d92c
...
@@ -313,6 +313,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
...
@@ -313,6 +313,8 @@ class SQLAnywhereStatement implements IteratorAggregate, Statement
$this
->
defaultFetchMode
=
$fetchMode
;
$this
->
defaultFetchMode
=
$fetchMode
;
$this
->
defaultFetchClass
=
$arg2
?:
$this
->
defaultFetchClass
;
$this
->
defaultFetchClass
=
$arg2
?:
$this
->
defaultFetchClass
;
$this
->
defaultFetchClassCtorArgs
=
$arg3
?
(
array
)
$arg3
:
$this
->
defaultFetchClassCtorArgs
;
$this
->
defaultFetchClassCtorArgs
=
$arg3
?
(
array
)
$arg3
:
$this
->
defaultFetchClassCtorArgs
;
return
true
;
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php
View file @
f440d92c
...
@@ -152,6 +152,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
...
@@ -152,6 +152,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
if
(
!
sqlsrv_begin_transaction
(
$this
->
conn
))
{
if
(
!
sqlsrv_begin_transaction
(
$this
->
conn
))
{
throw
SQLSrvException
::
fromSqlSrvErrors
();
throw
SQLSrvException
::
fromSqlSrvErrors
();
}
}
return
true
;
}
}
/**
/**
...
@@ -162,6 +164,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
...
@@ -162,6 +164,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
if
(
!
sqlsrv_commit
(
$this
->
conn
))
{
if
(
!
sqlsrv_commit
(
$this
->
conn
))
{
throw
SQLSrvException
::
fromSqlSrvErrors
();
throw
SQLSrvException
::
fromSqlSrvErrors
();
}
}
return
true
;
}
}
/**
/**
...
@@ -172,6 +176,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
...
@@ -172,6 +176,8 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
if
(
!
sqlsrv_rollback
(
$this
->
conn
))
{
if
(
!
sqlsrv_rollback
(
$this
->
conn
))
{
throw
SQLSrvException
::
fromSqlSrvErrors
();
throw
SQLSrvException
::
fromSqlSrvErrors
();
}
}
return
true
;
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
View file @
f440d92c
...
@@ -158,6 +158,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
...
@@ -158,6 +158,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
$this
->
variables
[
$param
]
=
$value
;
$this
->
variables
[
$param
]
=
$value
;
$this
->
types
[
$param
]
=
$type
;
$this
->
types
[
$param
]
=
$type
;
return
true
;
}
}
/**
/**
...
@@ -174,6 +176,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
...
@@ -174,6 +176,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
// unset the statement resource if it exists as the new one will need to be bound to the new variable
// unset the statement resource if it exists as the new one will need to be bound to the new variable
$this
->
stmt
=
null
;
$this
->
stmt
=
null
;
return
true
;
}
}
/**
/**
...
@@ -263,6 +267,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
...
@@ -263,6 +267,8 @@ class SQLSrvStatement implements IteratorAggregate, Statement
}
}
$this
->
result
=
true
;
$this
->
result
=
true
;
return
true
;
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment