Skip to content

Commit

Permalink
Added string as a valid cast
Browse files Browse the repository at this point in the history
  • Loading branch information
iainmckay committed Apr 21, 2016
1 parent 333e710 commit a34a0b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mapper/CastingObjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ protected function cast($obj, $propertyName, $type)
$tmp2 = (bool) $value;
$value = $tmp == $tmp2 ? $tmp2 : null;
break;

case 'string':
$value = (string) $value;
break;
}

$obj->{$propertyName} = $value;
Expand Down

0 comments on commit a34a0b4

Please sign in to comment.