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
7a7ff795
Commit
7a7ff795
authored
Jul 09, 2017
by
Alessandro Minoccheri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed array declarations inside Query directory
parent
7baf4489
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
35 deletions
+35
-35
CompositeExpression.php
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
+3
-3
QueryBuilder.php
lib/Doctrine/DBAL/Query/QueryBuilder.php
+32
-32
No files found.
lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php
View file @
7a7ff795
...
@@ -51,7 +51,7 @@ class CompositeExpression implements \Countable
...
@@ -51,7 +51,7 @@ class CompositeExpression implements \Countable
*
*
* @var array
* @var array
*/
*/
private
$parts
=
array
()
;
private
$parts
=
[]
;
/**
/**
* Constructor.
* Constructor.
...
@@ -59,7 +59,7 @@ class CompositeExpression implements \Countable
...
@@ -59,7 +59,7 @@ class CompositeExpression implements \Countable
* @param string $type Instance type of composite expression.
* @param string $type Instance type of composite expression.
* @param array $parts Composition of expressions to be joined on composite expression.
* @param array $parts Composition of expressions to be joined on composite expression.
*/
*/
public
function
__construct
(
$type
,
array
$parts
=
array
()
)
public
function
__construct
(
$type
,
array
$parts
=
[]
)
{
{
$this
->
type
=
$type
;
$this
->
type
=
$type
;
...
@@ -73,7 +73,7 @@ class CompositeExpression implements \Countable
...
@@ -73,7 +73,7 @@ class CompositeExpression implements \Countable
*
*
* @return \Doctrine\DBAL\Query\Expression\CompositeExpression
* @return \Doctrine\DBAL\Query\Expression\CompositeExpression
*/
*/
public
function
addMultiple
(
array
$parts
=
array
()
)
public
function
addMultiple
(
array
$parts
=
[]
)
{
{
foreach
((
array
)
$parts
as
$part
)
{
foreach
((
array
)
$parts
as
$part
)
{
$this
->
add
(
$part
);
$this
->
add
(
$part
);
...
...
lib/Doctrine/DBAL/Query/QueryBuilder.php
View file @
7a7ff795
...
@@ -63,17 +63,17 @@ class QueryBuilder
...
@@ -63,17 +63,17 @@ class QueryBuilder
/**
/**
* @var array The array of SQL parts collected.
* @var array The array of SQL parts collected.
*/
*/
private
$sqlParts
=
array
(
private
$sqlParts
=
[
'select'
=>
array
()
,
'select'
=>
[]
,
'from'
=>
array
()
,
'from'
=>
[]
,
'join'
=>
array
()
,
'join'
=>
[]
,
'set'
=>
array
()
,
'set'
=>
[]
,
'where'
=>
null
,
'where'
=>
null
,
'groupBy'
=>
array
()
,
'groupBy'
=>
[]
,
'having'
=>
null
,
'having'
=>
null
,
'orderBy'
=>
array
()
,
'orderBy'
=>
[]
,
'values'
=>
array
()
,
'values'
=>
[]
,
)
;
]
;
/**
/**
* The complete SQL string for this query.
* The complete SQL string for this query.
...
@@ -87,14 +87,14 @@ class QueryBuilder
...
@@ -87,14 +87,14 @@ class QueryBuilder
*
*
* @var array
* @var array
*/
*/
private
$params
=
array
()
;
private
$params
=
[]
;
/**
/**
* The parameter type map of this query.
* The parameter type map of this query.
*
*
* @var array
* @var array
*/
*/
private
$paramTypes
=
array
()
;
private
$paramTypes
=
[]
;
/**
/**
* The type of query this is. Can be select, update or delete.
* The type of query this is. Can be select, update or delete.
...
@@ -298,7 +298,7 @@ class QueryBuilder
...
@@ -298,7 +298,7 @@ class QueryBuilder
*
*
* @return $this This QueryBuilder instance.
* @return $this This QueryBuilder instance.
*/
*/
public
function
setParameters
(
array
$params
,
array
$types
=
array
()
)
public
function
setParameters
(
array
$params
,
array
$types
=
[]
)
{
{
$this
->
paramTypes
=
$types
;
$this
->
paramTypes
=
$types
;
$this
->
params
=
$params
;
$this
->
params
=
$params
;
...
@@ -527,10 +527,10 @@ class QueryBuilder
...
@@ -527,10 +527,10 @@ class QueryBuilder
return
$this
;
return
$this
;
}
}
return
$this
->
add
(
'from'
,
array
(
return
$this
->
add
(
'from'
,
[
'table'
=>
$delete
,
'table'
=>
$delete
,
'alias'
=>
$alias
'alias'
=>
$alias
)
);
]
);
}
}
/**
/**
...
@@ -557,10 +557,10 @@ class QueryBuilder
...
@@ -557,10 +557,10 @@ class QueryBuilder
return
$this
;
return
$this
;
}
}
return
$this
->
add
(
'from'
,
array
(
return
$this
->
add
(
'from'
,
[
'table'
=>
$update
,
'table'
=>
$update
,
'alias'
=>
$alias
'alias'
=>
$alias
)
);
]
);
}
}
/**
/**
...
@@ -590,9 +590,9 @@ class QueryBuilder
...
@@ -590,9 +590,9 @@ class QueryBuilder
return
$this
;
return
$this
;
}
}
return
$this
->
add
(
'from'
,
array
(
return
$this
->
add
(
'from'
,
[
'table'
=>
$insert
'table'
=>
$insert
)
);
]
);
}
}
/**
/**
...
@@ -612,10 +612,10 @@ class QueryBuilder
...
@@ -612,10 +612,10 @@ class QueryBuilder
*/
*/
public
function
from
(
$from
,
$alias
=
null
)
public
function
from
(
$from
,
$alias
=
null
)
{
{
return
$this
->
add
(
'from'
,
array
(
return
$this
->
add
(
'from'
,
[
'table'
=>
$from
,
'table'
=>
$from
,
'alias'
=>
$alias
'alias'
=>
$alias
)
,
true
);
]
,
true
);
}
}
/**
/**
...
@@ -659,14 +659,14 @@ class QueryBuilder
...
@@ -659,14 +659,14 @@ class QueryBuilder
*/
*/
public
function
innerJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
public
function
innerJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
{
{
return
$this
->
add
(
'join'
,
array
(
return
$this
->
add
(
'join'
,
[
$fromAlias
=>
array
(
$fromAlias
=>
[
'joinType'
=>
'inner'
,
'joinType'
=>
'inner'
,
'joinTable'
=>
$join
,
'joinTable'
=>
$join
,
'joinAlias'
=>
$alias
,
'joinAlias'
=>
$alias
,
'joinCondition'
=>
$condition
'joinCondition'
=>
$condition
)
]
)
,
true
);
]
,
true
);
}
}
/**
/**
...
@@ -688,14 +688,14 @@ class QueryBuilder
...
@@ -688,14 +688,14 @@ class QueryBuilder
*/
*/
public
function
leftJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
public
function
leftJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
{
{
return
$this
->
add
(
'join'
,
array
(
return
$this
->
add
(
'join'
,
[
$fromAlias
=>
array
(
$fromAlias
=>
[
'joinType'
=>
'left'
,
'joinType'
=>
'left'
,
'joinTable'
=>
$join
,
'joinTable'
=>
$join
,
'joinAlias'
=>
$alias
,
'joinAlias'
=>
$alias
,
'joinCondition'
=>
$condition
'joinCondition'
=>
$condition
)
]
)
,
true
);
]
,
true
);
}
}
/**
/**
...
@@ -717,14 +717,14 @@ class QueryBuilder
...
@@ -717,14 +717,14 @@ class QueryBuilder
*/
*/
public
function
rightJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
public
function
rightJoin
(
$fromAlias
,
$join
,
$alias
,
$condition
=
null
)
{
{
return
$this
->
add
(
'join'
,
array
(
return
$this
->
add
(
'join'
,
[
$fromAlias
=>
array
(
$fromAlias
=>
[
'joinType'
=>
'right'
,
'joinType'
=>
'right'
,
'joinTable'
=>
$join
,
'joinTable'
=>
$join
,
'joinAlias'
=>
$alias
,
'joinAlias'
=>
$alias
,
'joinCondition'
=>
$condition
'joinCondition'
=>
$condition
)
]
)
,
true
);
]
,
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