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
e670e432
Commit
e670e432
authored
Jan 15, 2018
by
Gabriel Caruso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify returns
parent
1faeb780
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
45 deletions
+9
-45
Connection.php
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php
+1
-5
SQLServerPlatform.php
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
+2
-10
Comparator.php
lib/Doctrine/DBAL/Schema/Comparator.php
+3
-15
Index.php
lib/Doctrine/DBAL/Schema/Index.php
+3
-15
No files found.
lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php
View file @
e670e432
...
...
@@ -30,11 +30,7 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection
public
function
quote
(
$value
,
$type
=
\PDO
::
PARAM_STR
)
{
if
(
\PDO
::
PARAM_BOOL
===
$type
)
{
if
(
$value
)
{
return
'true'
;
}
return
'false'
;
return
$value
?
'true'
:
'false'
;
}
return
parent
::
quote
(
$value
,
$type
);
...
...
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
View file @
e670e432
...
...
@@ -654,11 +654,7 @@ class SQLServerPlatform extends AbstractPlatform
// We need to drop an existing default constraint if the column was
// defined with a default value before and the native column type has changed.
if
(
$columnDiff
->
hasChanged
(
'type'
)
||
$columnDiff
->
hasChanged
(
'fixed'
))
{
return
true
;
}
return
false
;
return
$columnDiff
->
hasChanged
(
'type'
)
||
$columnDiff
->
hasChanged
(
'fixed'
);
}
/**
...
...
@@ -1320,11 +1316,7 @@ class SQLServerPlatform extends AbstractPlatform
$currentPosition
--
;
}
if
(
preg_match
(
'/SELECT\s+(DISTINCT\s+)?TOP\s/i'
,
$subQueryBuffer
))
{
return
true
;
}
return
false
;
return
(
bool
)
preg_match
(
'/SELECT\s+(DISTINCT\s+)?TOP\s/i'
,
$subQueryBuffer
);
}
/**
...
...
lib/Doctrine/DBAL/Schema/Comparator.php
View file @
e670e432
...
...
@@ -184,11 +184,7 @@ class Comparator
return
true
;
}
if
(
$sequence1
->
getInitialValue
()
!=
$sequence2
->
getInitialValue
())
{
return
true
;
}
return
false
;
return
$sequence1
->
getInitialValue
()
!=
$sequence2
->
getInitialValue
();
}
/**
...
...
@@ -406,11 +402,7 @@ class Comparator
return
true
;
}
if
(
$key1
->
onDelete
()
!=
$key2
->
onDelete
())
{
return
true
;
}
return
false
;
return
$key1
->
onDelete
()
!=
$key2
->
onDelete
();
}
/**
...
...
@@ -534,10 +526,6 @@ class Comparator
*/
public
function
diffIndex
(
Index
$index1
,
Index
$index2
)
{
if
(
$index1
->
isFullfilledBy
(
$index2
)
&&
$index2
->
isFullfilledBy
(
$index1
))
{
return
false
;
}
return
true
;
return
!
(
$index1
->
isFullfilledBy
(
$index2
)
&&
$index2
->
isFullfilledBy
(
$index1
));
}
}
lib/Doctrine/DBAL/Schema/Index.php
View file @
e670e432
...
...
@@ -226,11 +226,7 @@ class Index extends AbstractAsset implements Constraint
return
false
;
}
if
(
$other
->
isUnique
()
!=
$this
->
isUnique
())
{
return
false
;
}
return
true
;
return
$other
->
isUnique
()
==
$this
->
isUnique
();
}
return
false
;
...
...
@@ -251,11 +247,7 @@ class Index extends AbstractAsset implements Constraint
return
false
;
}
if
(
$this
->
spansColumns
(
$other
->
getColumns
())
&&
(
$this
->
isPrimary
()
||
$this
->
isUnique
())
&&
$this
->
samePartialIndex
(
$other
))
{
return
true
;
}
return
false
;
return
$this
->
spansColumns
(
$other
->
getColumns
())
&&
(
$this
->
isPrimary
()
||
$this
->
isUnique
())
&&
$this
->
samePartialIndex
(
$other
);
}
/**
...
...
@@ -348,11 +340,7 @@ class Index extends AbstractAsset implements Constraint
return
true
;
}
if
(
!
$this
->
hasOption
(
'where'
)
&&
!
$other
->
hasOption
(
'where'
))
{
return
true
;
}
return
false
;
return
!
$this
->
hasOption
(
'where'
)
&&
!
$other
->
hasOption
(
'where'
);
}
}
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