The expression \DateTime::createFromFor...E_FORMAT_MYSQL, $date); of type DateTime|false adds false to the return on line 18 which is incompatible with the return type documented by Oc\Util\DateUtil::dateTimeFromMySqlFormat of type DateTime. It seems like you forgot to handle an error condition.