diff --git a/src/Commands/Generators/NewShieldOauthGenerator.php b/src/Commands/Generators/NewShieldOauthGenerator.php index 58b3a5c..9e484a3 100644 --- a/src/Commands/Generators/NewShieldOauthGenerator.php +++ b/src/Commands/Generators/NewShieldOauthGenerator.php @@ -103,7 +103,7 @@ public function run(array $params): int // The proper class name should contain the `OAuth` suffix if it doesn't exist $class = str_ireplace('oauth', 'OAuth', $params[0]); - if (strpos($class, 'OAuth') === false) { + if (! str_contains($class, 'OAuth')) { $class .= 'OAuth'; } diff --git a/src/Libraries/Basic/ShieldOAuth.php b/src/Libraries/Basic/ShieldOAuth.php index 1e84b51..c232fa2 100644 --- a/src/Libraries/Basic/ShieldOAuth.php +++ b/src/Libraries/Basic/ShieldOAuth.php @@ -57,7 +57,7 @@ public function allOAuth(): string $files = new FileCollection(); /** @var Autoload $autoload */ - $autoload = config(Autoload::class); + $autoload = new Autoload(); // Checking if it is installed manually if (array_key_exists('Datamweb\ShieldOAuth', $autoload->psr4)) {