Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Oct 2, 2024
1 parent a047423 commit 31baaa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CanvasServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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);
Expand Down

0 comments on commit 31baaa5

Please sign in to comment.