1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 16:14:03 +00:00

Fix code style (php-cs-fixer)

This commit is contained in:
PHP CS Fixer 2025-01-02 04:47:12 +00:00
parent 9bb06afc57
commit ededbbe1e2

View file

@ -22,7 +22,9 @@ class DisallowSqliteAttach implements Feature
// Handle any already resolved connections // Handle any already resolved connections
foreach (DB::getConnections() as $connection) { foreach (DB::getConnections() as $connection) {
if ($connection instanceof SQLiteConnection) { if ($connection instanceof SQLiteConnection) {
if (! $this->loadExtension($connection->getPdo())) return; if (! $this->loadExtension($connection->getPdo())) {
return;
}
} }
} }
@ -41,7 +43,9 @@ class DisallowSqliteAttach implements Feature
static::$loadExtensionSupported = method_exists($pdo, 'loadExtension'); static::$loadExtensionSupported = method_exists($pdo, 'loadExtension');
} }
if (static::$loadExtensionSupported === false) return false; if (static::$loadExtensionSupported === false) {
return false;
}
$suffix = match (PHP_OS_FAMILY) { $suffix = match (PHP_OS_FAMILY) {
'Linux' => '.so', 'Linux' => '.so',
@ -54,7 +58,9 @@ class DisallowSqliteAttach implements Feature
$arm = $arch === 'aarch64' || $arch === 'arm64'; $arm = $arch === 'aarch64' || $arch === 'arm64';
static::$extensionPath ??= realpath(base_path('vendor/stancl/tenancy/src/extensions/lib/' . ($arm ? 'arm/' : '') . 'noattach' . $suffix)); 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); $pdo->loadExtension(static::$extensionPath);