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
c91cdd76
Commit
c91cdd76
authored
May 14, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DBAL-121' into 2.0.x
parents
693953dd
7c241a57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
DecimalType.php
lib/Doctrine/DBAL/Types/DecimalType.php
+1
-1
TypeConversionTest.php
tests/Doctrine/Tests/DBAL/Functional/TypeConversionTest.php
+1
-1
DecimalTest.php
tests/Doctrine/Tests/DBAL/Types/DecimalTest.php
+1
-1
No files found.
lib/Doctrine/DBAL/Types/DecimalType.php
View file @
c91cdd76
...
...
@@ -40,6 +40,6 @@ class DecimalType extends Type
public
function
convertToPHPValue
(
$value
,
AbstractPlatform
$platform
)
{
return
(
null
===
$value
)
?
null
:
(
double
)
$value
;
return
(
null
===
$value
)
?
null
:
$value
;
}
}
\ No newline at end of file
tests/Doctrine/Tests/DBAL/Functional/TypeConversionTest.php
View file @
c91cdd76
...
...
@@ -60,7 +60,7 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
array
(
'array'
,
array
(
'foo'
=>
'bar'
),
'array'
),
array
(
'object'
,
$obj
,
'object'
),
array
(
'float'
,
1.5
,
'float'
),
array
(
'decimal'
,
1.55
,
'
float
'
),
array
(
'decimal'
,
1.55
,
'
string
'
),
);
}
...
...
tests/Doctrine/Tests/DBAL/Types/DecimalTest.php
View file @
c91cdd76
...
...
@@ -21,7 +21,7 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase
public
function
testDecimalConvertsToPHPValue
()
{
$this
->
assert
Type
(
'float
'
,
$this
->
_type
->
convertToPHPValue
(
'5.5'
,
$this
->
_platform
));
$this
->
assert
InternalType
(
'string
'
,
$this
->
_type
->
convertToPHPValue
(
'5.5'
,
$this
->
_platform
));
}
public
function
testDecimalNullConvertsToPHPValue
()
...
...
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