Skip to content

Commit

Permalink
chore: stupid space
Browse files Browse the repository at this point in the history
  • Loading branch information
darkterminal committed Jul 13, 2024
1 parent 48608aa commit b6237e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Database/LibSQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(array $config = [])
{
$url = str_replace('file:', '', $config['url']);
$config['url'] = match ($this->checkPathOrFilename($config['url'])) {
'filename' => 'file:'.database_path($url),
'filename' => 'file:' . database_path($url),
default => $config['url'],
};

Expand Down Expand Up @@ -144,9 +144,9 @@ public function quote(string $value): string

private function setConnectionMode(string $path, string $url = '', string $token = '', bool $remoteOnly = false): void
{
if ((str_starts_with($path, 'file:') !== false || $path !== 'file:') && ! empty($url) && ! empty($token) && $remoteOnly === false) {
if ((str_starts_with($path, 'file:') !== false || $path !== 'file:') && !empty($url) && !empty($token) && $remoteOnly === false) {
$this->connection_mode = 'remote_replica';
} elseif (strpos($path, 'file:') !== false && ! empty($url) && ! empty($token) && $remoteOnly === true) {
} elseif (strpos($path, 'file:') !== false && !empty($url) && !empty($token) && $remoteOnly === true) {
$this->connection_mode = 'remote';
} elseif (strpos($path, 'file:') !== false) {
$this->connection_mode = 'local';
Expand Down Expand Up @@ -182,4 +182,4 @@ public function __destruct()
$this->db->close();
}
}
}
}

0 comments on commit b6237e1

Please sign in to comment.