From 31baaa58de85590c2390add098d1f702c4519cb4 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 2 Oct 2024 08:55:34 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- src/CanvasServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CanvasServiceProvider.php b/src/CanvasServiceProvider.php index 1b9418c..d96e531 100644 --- a/src/CanvasServiceProvider.php +++ b/src/CanvasServiceProvider.php @@ -24,8 +24,8 @@ public function register(): void $manager->setDefaultDriver('canvas'); }); - $this->app->singleton('orchestra.canvas', function (Application $app) { - $workingPath = \defined('CANVAS_WORKING_PATH') ? CANVAS_WORKING_PATH : $this->app->basePath(); + $this->app->singleton('orchestra.canvas', static function (Application $app) { + $workingPath = \defined('CANVAS_WORKING_PATH') ? CANVAS_WORKING_PATH : $app->basePath(); $filesystem = $app->make('files'); @@ -39,7 +39,7 @@ public function register(): void 'feature' => 'Tests\TestCase', ]); - $config['namespace'] = rescue(fn () => rtrim($this->app->getNamespace(), '\\'), null, false); + $config['namespace'] = rescue(fn () => rtrim($app->getNamespace(), '\\'), null, false); } return Canvas::preset($config, $workingPath);