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
2f7bd807
Unverified
Commit
2f7bd807
authored
Oct 05, 2018
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of func_num_args in AbstractPlatform::getDummySelectSQL()
parent
2b33eeff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
17 deletions
+3
-17
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-7
DB2Platform.php
lib/Doctrine/DBAL/Platforms/DB2Platform.php
+1
-5
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+1
-5
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
2f7bd807
...
@@ -35,9 +35,7 @@ use function array_unique;
...
@@ -35,9 +35,7 @@ use function array_unique;
use
function
array_values
;
use
function
array_values
;
use
function
count
;
use
function
count
;
use
function
explode
;
use
function
explode
;
use
function
func_get_arg
;
use
function
func_get_args
;
use
function
func_get_args
;
use
function
func_num_args
;
use
function
implode
;
use
function
implode
;
use
function
in_array
;
use
function
in_array
;
use
function
is_array
;
use
function
is_array
;
...
@@ -3455,13 +3453,9 @@ abstract class AbstractPlatform
...
@@ -3455,13 +3453,9 @@ abstract class AbstractPlatform
/**
/**
* This is for test reasons, many vendors have special requirements for dummy statements.
* This is for test reasons, many vendors have special requirements for dummy statements.
*
* @return string
*/
*/
public
function
getDummySelectSQL
(
)
public
function
getDummySelectSQL
(
string
$expression
=
'1'
)
:
string
{
{
$expression
=
func_num_args
()
>
0
?
func_get_arg
(
0
)
:
'1'
;
return
sprintf
(
'SELECT %s'
,
$expression
);
return
sprintf
(
'SELECT %s'
,
$expression
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
2f7bd807
...
@@ -13,8 +13,6 @@ use function array_merge;
...
@@ -13,8 +13,6 @@ use function array_merge;
use
function
count
;
use
function
count
;
use
function
current
;
use
function
current
;
use
function
explode
;
use
function
explode
;
use
function
func_get_arg
;
use
function
func_num_args
;
use
function
implode
;
use
function
implode
;
use
function
sprintf
;
use
function
sprintf
;
use
function
strpos
;
use
function
strpos
;
...
@@ -867,10 +865,8 @@ class DB2Platform extends AbstractPlatform
...
@@ -867,10 +865,8 @@ class DB2Platform extends AbstractPlatform
/**
/**
* {@inheritDoc}
* {@inheritDoc}
*/
*/
public
function
getDummySelectSQL
(
)
public
function
getDummySelectSQL
(
string
$expression
=
'1'
)
:
string
{
{
$expression
=
func_num_args
()
>
0
?
func_get_arg
(
0
)
:
'1'
;
return
sprintf
(
'SELECT %s FROM sysibm.sysdummy1'
,
$expression
);
return
sprintf
(
'SELECT %s FROM sysibm.sysdummy1'
,
$expression
);
}
}
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
2f7bd807
...
@@ -16,8 +16,6 @@ use InvalidArgumentException;
...
@@ -16,8 +16,6 @@ use InvalidArgumentException;
use
function
array_merge
;
use
function
array_merge
;
use
function
count
;
use
function
count
;
use
function
explode
;
use
function
explode
;
use
function
func_get_arg
;
use
function
func_num_args
;
use
function
implode
;
use
function
implode
;
use
function
preg_match
;
use
function
preg_match
;
use
function
sprintf
;
use
function
sprintf
;
...
@@ -1102,10 +1100,8 @@ SQL
...
@@ -1102,10 +1100,8 @@ SQL
/**
/**
* {@inheritDoc}
* {@inheritDoc}
*/
*/
public
function
getDummySelectSQL
(
)
public
function
getDummySelectSQL
(
string
$expression
=
'1'
)
:
string
{
{
$expression
=
func_num_args
()
>
0
?
func_get_arg
(
0
)
:
'1'
;
return
sprintf
(
'SELECT %s FROM DUAL'
,
$expression
);
return
sprintf
(
'SELECT %s FROM DUAL'
,
$expression
);
}
}
...
...
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