Skip to content

Commit

Permalink
personal style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetry committed Oct 10, 2023
1 parent 366b41d commit 68472f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Schema/BuilderView.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ trait BuilderView
/**
* Create a materialized view on the schema.
*/
public function createMaterializedView(string $name, QueryBuilder|string $query, bool $withData = true, array $columns = null): void
public function createMaterializedView(string $name, QueryBuilder|string $query, bool $withData = true, array $columns = []): void
{
$name = $this->getConnection()->getSchemaGrammar()->wrapTable($name);
if (null !== $columns) {
if (filled($columns)) {
$columns = $this->getConnection()->getSchemaGrammar()->columnize($columns);
$name = "{$name} ({$columns})";
}
Expand Down Expand Up @@ -49,10 +49,10 @@ public function createRecursiveViewOrReplace(string $name, QueryBuilder|string $
/**
* Create a view on the schema.
*/
public function createView(string $name, QueryBuilder|string $query, array $columns = null): void
public function createView(string $name, QueryBuilder|string $query, array $columns = []): void
{
$name = $this->getConnection()->getSchemaGrammar()->wrapTable($name);
if (null !== $columns) {
if (filled($columns)) {
$columns = $this->getConnection()->getSchemaGrammar()->columnize($columns);
$name = "{$name} ({$columns})";
}
Expand All @@ -63,10 +63,10 @@ public function createView(string $name, QueryBuilder|string $query, array $colu
/**
* Create or replace a view on the schema.
*/
public function createViewOrReplace(string $name, QueryBuilder|string $query, array $columns = null): void
public function createViewOrReplace(string $name, QueryBuilder|string $query, array $columns = []): void
{
$name = $this->getConnection()->getSchemaGrammar()->wrapTable($name);
if (null !== $columns) {
if (filled($columns)) {
$columns = $this->getConnection()->getSchemaGrammar()->columnize($columns);
$name = "{$name} ({$columns})";
}
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Facades/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* @method static void createFunctionOrReplace(string $name, array $parameters, array|string $return, string $language, string $body, array $options = [])
* @method static void createRecursiveView(string $name, Builder|string $query, array $columns)
* @method static void createRecursiveViewOrReplace(string $name, Builder|string $query, array $columns)
* @method static void createMaterializedView(string $name, Builder|string $query, bool $withData = true, array $columns = null)
* @method static void createView(string $name, Builder|string $query, array $columns = null)
* @method static void createViewOrReplace(string $name, Builder|string $query, array $columns = null)
* @method static void createMaterializedView(string $name, Builder|string $query, bool $withData = true, array $columns = [])
* @method static void createView(string $name, Builder|string $query, array $columns = [])
* @method static void createViewOrReplace(string $name, Builder|string $query, array $columns = [])
* @method static void dropExtension(string ...$name)
* @method static void dropExtensionIfExists(string ...$name)
* @method static void dropFunction(string $name, ?array $arguments = null)
Expand Down

0 comments on commit 68472f9

Please sign in to comment.