Skip to content

Commit

Permalink
Merge 0f308d5 into 343a57d
Browse files Browse the repository at this point in the history
  • Loading branch information
codeliner committed Oct 14, 2019
2 parents 343a57d + 0f308d5 commit 9808092
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/PersistenceStrategy/PostgresAggregateStreamStrategy.php
Expand Up @@ -57,7 +57,7 @@ public function createSchema(string $tableName): array
);
EOT;

return array_merge($this->getSchemaCreationSchema($tableName), [
return \array_merge($this->getSchemaCreationSchema($tableName), [
$statement,
"CREATE UNIQUE INDEX on $tableName ((metadata->>'_aggregate_version'));",
]);
Expand Down Expand Up @@ -109,13 +109,13 @@ public function generateTableName(StreamName $streamName): string
return $table;
}

private function getSchemaCreationSchema(string $tableName) : array
private function getSchemaCreationSchema(string $tableName): array
{
if (!$schemaName = $this->extractSchema($tableName)) {
if (! $schemaName = $this->extractSchema($tableName)) {
return [];
}

return [sprintf(
return [\sprintf(
'CREATE SCHEMA IF NOT EXISTS %s',
$schemaName
)];
Expand Down
8 changes: 4 additions & 4 deletions src/PersistenceStrategy/PostgresSimpleStreamStrategy.php
Expand Up @@ -56,7 +56,7 @@ public function createSchema(string $tableName): array
);
EOT;

return array_merge($this->getSchemaCreationSchema($tableName), [
return \array_merge($this->getSchemaCreationSchema($tableName), [
$statement,
]);
}
Expand Down Expand Up @@ -101,13 +101,13 @@ public function generateTableName(StreamName $streamName): string
return $table;
}

private function getSchemaCreationSchema(string $tableName) : array
private function getSchemaCreationSchema(string $tableName): array
{
if (!$schemaName = $this->extractSchema($tableName)) {
if (! $schemaName = $this->extractSchema($tableName)) {
return [];
}

return [sprintf(
return [\sprintf(
'CREATE SCHEMA IF NOT EXISTS %s',
$schemaName
)];
Expand Down
8 changes: 4 additions & 4 deletions src/PersistenceStrategy/PostgresSingleStreamStrategy.php
Expand Up @@ -69,7 +69,7 @@ public function createSchema(string $tableName): array
((metadata->>'_aggregate_type'), (metadata->>'_aggregate_id'), no);
EOT;

return array_merge($this->getSchemaCreationSchema($tableName), [
return \array_merge($this->getSchemaCreationSchema($tableName), [
$statement,
$index1,
$index2,
Expand Down Expand Up @@ -116,13 +116,13 @@ public function generateTableName(StreamName $streamName): string
return $table;
}

private function getSchemaCreationSchema(string $tableName) : array
private function getSchemaCreationSchema(string $tableName): array
{
if (!$schemaName = $this->extractSchema($tableName)) {
if (! $schemaName = $this->extractSchema($tableName)) {
return [];
}

return [sprintf(
return [\sprintf(
'CREATE SCHEMA IF NOT EXISTS %s',
$schemaName
)];
Expand Down

0 comments on commit 9808092

Please sign in to comment.