Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Aug 15, 2023
1 parent e416f0f commit 12141d4
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/Workbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace Orchestra\Workbench;

use Orchestra\Testbench\Contracts\Config as ConfigContract;
use Orchestra\Testbench\Foundation\Config;
use function Orchestra\Testbench\package_path;

/**
* @phpstan-import-type TWorkbenchConfig from \Orchestra\Testbench\Foundation\Config
*/
Expand All @@ -30,7 +26,7 @@ public static function laravelPath(string $path = ''): string
*/
public static function packagePath(string $path = ''): string
{
return package_path($path);
return \Orchestra\Testbench\package_path($path);
}

/**
Expand All @@ -41,9 +37,7 @@ public static function packagePath(string $path = ''): string
*/
public static function path(string $path = ''): string
{
return static::packagePath(
'workbench'.($path != '' ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : '')
);
return \Orchestra\Testbench\workbench_path($path);
}

/**
Expand All @@ -56,12 +50,7 @@ public static function path(string $path = ''): string
*/
public static function config($key = null)
{
/** @var \Orchestra\Testbench\Contracts\Config $config */
$config = app()->bound(ConfigContract::class)
? app()->make(ConfigContract::class)
: new Config();

$workbench = $config->getWorkbenchAttributes();
$workbench = \Orchestra\Testbench\workbench();

if (! \is_null($key)) {
return $workbench[$key] ?? null;
Expand Down

0 comments on commit 12141d4

Please sign in to comment.