Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:kiwilan/typescriptable-laravel i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
ewilan-riviere committed Jul 25, 2024
2 parents a3aa92c + 4792ee6 commit 0212217
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Typed/Eloquent/Printer/PrinterEloquentTypescript.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PrinterEloquentTypescript
*/
public static function make(array $models): string
{
$self = new self();
$self = new self;

/** @var string[] */
$contents = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Typed/EloquentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function __construct(
protected ?string $typescript = null,
) {}

public static function make(EloquentConfig $config = new EloquentConfig()): self
public static function make(EloquentConfig $config = new EloquentConfig): self
{
return new self($config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Typed/RouteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function __construct(
protected ?string $typescriptTypes = null,
) {}

public static function make(RouteConfig $config = new RouteConfig()): self
public static function make(RouteConfig $config = new RouteConfig): self
{
$self = new self($config);
$self->routes = $self->parseRoutes();
Expand Down
2 changes: 1 addition & 1 deletion src/Typed/Settings/Printer/PrinterSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PrinterSettings
*/
public static function make(array $items): string
{
$self = new self();
$self = new self;

/** @var string[] */
$content = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Typed/SettingsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function __construct(
protected ?string $typescript = null,
) {}

public static function make(SettingsConfig $config = new SettingsConfig()): ?self
public static function make(SettingsConfig $config = new SettingsConfig): ?self
{
$self = new self($config);

Expand Down
6 changes: 3 additions & 3 deletions src/Typescriptable.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ public static function head(): string
return implode(PHP_EOL, self::TS_HEAD);
}

public static function models(EloquentConfig $config = new EloquentConfig()): EloquentType
public static function models(EloquentConfig $config = new EloquentConfig): EloquentType
{
return EloquentType::make($config)->execute();
}

public static function routes(RouteConfig $config = new RouteConfig()): RouteType
public static function routes(RouteConfig $config = new RouteConfig): RouteType
{
return RouteType::make($config);
}

public static function settings(SettingsConfig $config = new SettingsConfig()): ?SettingsType
public static function settings(SettingsConfig $config = new SettingsConfig): ?SettingsType
{
return SettingsType::make($config);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/EloquentConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'Kiwilan\\Typescriptable\\Tests\\Data\\Models\\SushiTest',
]);

$config = new EloquentConfig();
$config = new EloquentConfig;

expect($config->modelsPath)->toContain('tests/Data/Models');
expect($config->phpPath)->toBeNull();
Expand Down

0 comments on commit 0212217

Please sign in to comment.