Laravel comes bundled with https://github.com/briannesbitt/Carbon so, my suggestion, why not move away from raw DateTime to carbon?
We could refactor some things like:
BestIt\Harvest\Endpoints\Timesheet
public function all($slim = true, DateTime $dateTime = null, $userId = null)
{
// ...
if ($dateTime !== null) {
$day = (int) $dateTime->format('z') + 1;
$year = $dateTime->format('Y');
$uri .= "/{$day}/{$year}";
}
Laravel comes bundled with https://github.com/briannesbitt/Carbon so, my suggestion, why not move away from raw DateTime to carbon?
We could refactor some things like:
BestIt\Harvest\Endpoints\Timesheet