From 9d0c83ad205afbb2068505c3e8857ecc8bbc496e Mon Sep 17 00:00:00 2001 From: Morten Poul Jensen Date: Mon, 23 Nov 2020 14:27:14 +0100 Subject: [PATCH] fix: use app property --- src/SchedulingTasksServiceProvider.php | 6 +++--- src/TaskLoader.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SchedulingTasksServiceProvider.php b/src/SchedulingTasksServiceProvider.php index 9915cc9..908926b 100644 --- a/src/SchedulingTasksServiceProvider.php +++ b/src/SchedulingTasksServiceProvider.php @@ -14,7 +14,7 @@ class SchedulingTasksServiceProvider extends ServiceProvider */ public function boot() { - if ($this->container->runningInConsole()) { + if ($this->app->runningInConsole()) { $this->commands([ TaskMakeCommand::class, ]); @@ -28,10 +28,10 @@ public function boot() */ public function register() { - $this->container->singleton(TaskLoader::class, function ($app) { + $this->app->singleton(TaskLoader::class, function ($app) { return new TaskLoader($app); }); - $this->container->alias(TaskLoader::class, 'task-loader'); + $this->app->alias(TaskLoader::class, 'task-loader'); } } diff --git a/src/TaskLoader.php b/src/TaskLoader.php index d9cd7e9..5534eac 100644 --- a/src/TaskLoader.php +++ b/src/TaskLoader.php @@ -14,14 +14,14 @@ class TaskLoader public function __construct(Application $app) { - $this->container = $app; + $this->app = $app; } public function loadFor(Schedule $schedule, array $exclude = []) { - $namespace = $this->container->getNamespace(); + $namespace = $this->app->getNamespace(); - $path = $this->container->path('Console/Tasks'); + $path = $this->app->path('Console/Tasks'); if (! is_dir($path)) { return;