User tests: Successful: Unsuccessful:
Override add()
and sub()
functions to provide appropriate chaining that currently breaks due to return type of the parent class DateTime
.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I'm confused though. If DateTime::add()
is returning an instance of $this
(which http://php.net/manual/en/datetime.add.php implies is happening) then it should be fine, just the IDE hinting would be a bit messed up. If it's returning a clone of the object or some other mutation, then that needs to be accounted for in the method overrides and not just extend the method to change the doc blocks for IDE convenience.
Ok, I understand. Can you please suggest something better for this case,
the IDE hinting trouble?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-10-23 06:58:56 |
Closed_By | ⇒ | izharaazmi |
Test Instructions:
This would fail without this patch, because
toSql
function is not a member ofDateTime
class, it is defined inJDate
.