Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lupinitylabs committed Sep 6, 2024
1 parent 5b9dd58 commit a9da03b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/Classes/AbstractPostgresSchemaStateProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ protected function baseVariables(mixed $config): array
}

/**
* Get the base dump command arguments for PostgreSQL as a string.
* Get the base dump command as a string.
*/
protected function baseDumpCommand(): string
{
return 'pg_dump ' . implode(' ', $this->getBaseDumpArguments());
}

/**
* Get the required base dump arguments as an array.
*/
protected function getBaseDumpArguments(): array
{
return [
'--no-owner', // do not output commands to set ownership of objects to match the original database
'--no-acl', // do not output commands to set access privileges of objects to match the original database
'--no-owner', // do not output commands to set ownership of objects to match the original database.
'--no-acl', // do not output commands to set access privileges of objects to match the original database.
'--host="${:LARAVEL_LOAD_HOST}"',
'--port="${:LARAVEL_LOAD_PORT}"',
'--username="${:LARAVEL_LOAD_USER}"',
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/PostgresSchemaStateProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Database\Connection;

/**
* This is a proxy to the MySqlSchemaState class which allows us to override methods to match our own requirements.
* This is a proxy to the PostgresSchemaState class which allows us to override methods to match our own requirements.
* Unfortunately, the class is not bound to the IOC container and thus cannot be switched out at framework level.
* However, you may extend this proxy, and override its app container binding with your custom implementation.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Protector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Cybex\Protector\Exceptions\FailedCreatingDestinationPathException;
use Cybex\Protector\Exceptions\FailedDumpGenerationException;
use Cybex\Protector\Exceptions\FailedImportException;
use Cybex\Protector\Exceptions\FailedMysqlCommandException;
use Cybex\Protector\Exceptions\FailedRemoteDatabaseFetchingException;
use Cybex\Protector\Exceptions\FailedWipeException;
use Cybex\Protector\Exceptions\FileNotFoundException;
Expand Down Expand Up @@ -95,7 +94,6 @@ public function importDump(string $sourceFilePath, array $options = []): void
$schemaStateProxy = $this->getProxyForSchemaState($schemaState);

if (!Arr::get($options, 'no-wipe')) {
// Wipe the database before importing the dump.
try {
$this->wipeDatabase($connection);
} catch (Throwable $exception) {
Expand Down

0 comments on commit a9da03b

Please sign in to comment.