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
bd593e69
Unverified
Commit
bd593e69
authored
Jul 17, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistent arguments of Statement::bindValue()
parent
5e3da655
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Statement.php
lib/Doctrine/DBAL/Statement.php
+6
-6
No files found.
lib/Doctrine/DBAL/Statement.php
View file @
bd593e69
...
@@ -82,16 +82,16 @@ class Statement implements IteratorAggregate, DriverStatement
...
@@ -82,16 +82,16 @@ class Statement implements IteratorAggregate, DriverStatement
* type and the value undergoes the conversion routines of the mapping type before
* type and the value undergoes the conversion routines of the mapping type before
* being bound.
* being bound.
*
*
* @param string|int $
name
The name or position of the parameter.
* @param string|int $
param
The name or position of the parameter.
* @param mixed $value The value of the parameter.
* @param mixed $value The value of the parameter.
* @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance.
* @param mixed $type Either a PDO binding type or a DBAL mapping type name or instance.
*
*
* @return bool TRUE on success, FALSE on failure.
* @return bool TRUE on success, FALSE on failure.
*/
*/
public
function
bindValue
(
$
name
,
$value
,
$type
=
ParameterType
::
STRING
)
public
function
bindValue
(
$
param
,
$value
,
$type
=
ParameterType
::
STRING
)
{
{
$this
->
params
[
$
name
]
=
$value
;
$this
->
params
[
$
param
]
=
$value
;
$this
->
types
[
$
name
]
=
$type
;
$this
->
types
[
$
param
]
=
$type
;
if
(
$type
!==
null
)
{
if
(
$type
!==
null
)
{
if
(
is_string
(
$type
))
{
if
(
is_string
(
$type
))
{
$type
=
Type
::
getType
(
$type
);
$type
=
Type
::
getType
(
$type
);
...
@@ -104,10 +104,10 @@ class Statement implements IteratorAggregate, DriverStatement
...
@@ -104,10 +104,10 @@ class Statement implements IteratorAggregate, DriverStatement
$bindingType
=
$type
;
$bindingType
=
$type
;
}
}
return
$this
->
stmt
->
bindValue
(
$
name
,
$value
,
$bindingType
);
return
$this
->
stmt
->
bindValue
(
$
param
,
$value
,
$bindingType
);
}
}
return
$this
->
stmt
->
bindValue
(
$
name
,
$value
);
return
$this
->
stmt
->
bindValue
(
$
param
,
$value
);
}
}
/**
/**
...
...
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