diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 30d6768..b0f5733 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -58,7 +58,7 @@ final class BackendController extends Controller implements DashboardElementInte /** @var \Modules\Calendar\Models\Calendar $calendar */ $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; $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 */ $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; return $view; diff --git a/Models/Schedule.php b/Models/Schedule.php index f087084..6b72af9 100755 --- a/Models/Schedule.php +++ b/Models/Schedule.php @@ -160,7 +160,9 @@ class Schedule /** * @param int $status Schedule status * - * @return $this + * @return self + * + * @throws InvalidEnumValue * * @since 1.0.0 */ @@ -188,7 +190,9 @@ class Schedule /** * @param int $freqType Frequency type * - * @return $this + * @return self + * + * @throws InvalidEnumValue * * @since 1.0.0 */ @@ -216,7 +220,9 @@ class Schedule /** * @param int $patternInterval Interval type * - * @return $this + * @return self + * + * @throws InvalidEnumValue * * @since 1.0.0 */ diff --git a/tests/Autoloader.php b/tests/Autoloader.php index 80a0a1e..d2d0080 100755 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -71,14 +71,12 @@ final class Autoloader * * @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 */ public static function defaultAutoloader(string $class) : void { $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = \strtr($class, '_\\', '//'); foreach (self::$paths as $path) { $file = $path . $class . '.php';