Skip to content

Commit

Permalink
Fix code style (php-cs-fixer)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHP CS Fixer committed Jan 2, 2025
1 parent 9bb06af commit ededbbe
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Features/DisallowSqliteAttach.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public function bootstrap(Tenancy $tenancy): void
// Handle any already resolved connections
foreach (DB::getConnections() as $connection) {
if ($connection instanceof SQLiteConnection) {
if (! $this->loadExtension($connection->getPdo())) return;
if (! $this->loadExtension($connection->getPdo())) {
return;
}
}
}

Expand All @@ -41,7 +43,9 @@ protected function loadExtension(PDO $pdo): bool
static::$loadExtensionSupported = method_exists($pdo, 'loadExtension');
}

if (static::$loadExtensionSupported === false) return false;
if (static::$loadExtensionSupported === false) {
return false;
}

$suffix = match (PHP_OS_FAMILY) {
'Linux' => '.so',
Expand All @@ -54,7 +58,9 @@ protected function loadExtension(PDO $pdo): bool
$arm = $arch === 'aarch64' || $arch === 'arm64';

static::$extensionPath ??= realpath(base_path('vendor/stancl/tenancy/src/extensions/lib/' . ($arm ? 'arm/' : '') . 'noattach' . $suffix));
if (static::$extensionPath === false) return false;
if (static::$extensionPath === false) {
return false;
}

$pdo->loadExtension(static::$extensionPath);

Expand Down

0 comments on commit ededbbe

Please sign in to comment.