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 Dec 14, 2024
1 parent e80fa7a commit 8fd4c8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Workbench/Workbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,16 @@ public static function applicationUserModel(): ?string

/**
* Detect namespace by type.
*
* @param string $type
* @param bool $force
* @return string|null
*/
public static function detectNamespace(string $type): ?string
public static function detectNamespace(string $type, bool $force = false): ?string
{
$type = trim($type, '/');

if (! isset(static::$cachedNamespaces[$type])) {
if (! isset(static::$cachedNamespaces[$type]) || $force === true) {
static::$cachedNamespaces[$type] = null;

/** @var array{'autoload-dev': array{'psr-4': array<string, array<int, string>|string>}} $composer */
Expand Down

0 comments on commit 8fd4c8f

Please sign in to comment.