This commit is contained in:
Dennis Eichhorn 2023-08-28 22:06:33 +00:00
parent a966cb91cd
commit 126a0cf004
3 changed files with 12 additions and 8 deletions

View File

@ -58,7 +58,7 @@ final class BackendController extends Controller implements DashboardElementInte
/** @var \Modules\Calendar\Models\Calendar $calendar */ /** @var \Modules\Calendar\Models\Calendar $calendar */
$calendar = CalendarMapper::get()->where('id', 1)->execute(); $calendar = CalendarMapper::get()->where('id', 1)->execute();
$calendar->date = new SmartDateTime((string) ($request->getData('date') ?? 'now')); $calendar->date = new SmartDateTime($request->getDataString('date') ?? 'now');
$view->data['calendar'] = $calendar; $view->data['calendar'] = $calendar;
$calendarEventPopup = new \Modules\Calendar\Theme\Backend\Components\Event\BaseView($this->app->l11nManager, $request, $response); $calendarEventPopup = new \Modules\Calendar\Theme\Backend\Components\Event\BaseView($this->app->l11nManager, $request, $response);
@ -86,7 +86,7 @@ final class BackendController extends Controller implements DashboardElementInte
/** @var \Modules\Calendar\Models\Calendar $calendar */ /** @var \Modules\Calendar\Models\Calendar $calendar */
$calendar = CalendarMapper::get()->where('id', 1)->execute(); $calendar = CalendarMapper::get()->where('id', 1)->execute();
$calendar->date = new SmartDateTime((string) ($request->getData('date') ?? 'now')); $calendar->date = new SmartDateTime($request->getDataString('date') ?? 'now');
$view->data['cal'] = $calendar; $view->data['cal'] = $calendar;
return $view; return $view;

View File

@ -160,7 +160,9 @@ class Schedule
/** /**
* @param int $status Schedule status * @param int $status Schedule status
* *
* @return $this * @return self
*
* @throws InvalidEnumValue
* *
* @since 1.0.0 * @since 1.0.0
*/ */
@ -188,7 +190,9 @@ class Schedule
/** /**
* @param int $freqType Frequency type * @param int $freqType Frequency type
* *
* @return $this * @return self
*
* @throws InvalidEnumValue
* *
* @since 1.0.0 * @since 1.0.0
*/ */
@ -216,7 +220,9 @@ class Schedule
/** /**
* @param int $patternInterval Interval type * @param int $patternInterval Interval type
* *
* @return $this * @return self
*
* @throws InvalidEnumValue
* *
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -71,14 +71,12 @@ final class Autoloader
* *
* @return void * @return void
* *
* @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation.
*
* @since 1.0.0 * @since 1.0.0
*/ */
public static function defaultAutoloader(string $class) : void public static function defaultAutoloader(string $class) : void
{ {
$class = \ltrim($class, '\\'); $class = \ltrim($class, '\\');
$class = \str_replace(['_', '\\'], '/', $class); $class = \strtr($class, '_\\', '//');
foreach (self::$paths as $path) { foreach (self::$paths as $path) {
$file = $path . $class . '.php'; $file = $path . $class . '.php';