Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmccreary committed Dec 6, 2023
1 parent 747240a commit 8b39b97
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Generators/ModelGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ protected function buildRelationships(Model $model): string
protected function addTraits(Model $model, $stub): string
{
$traits = ['HasFactory'];

if ($model->usesSoftDeletes()) {
$this->addImport($model, 'Illuminate\\Database\\Eloquent\\SoftDeletes');
$traits[] = 'SoftDeletes';
}

if ($model->usesUuids()) {
$this->addImport($model, 'Illuminate\\Database\\Eloquent\\Concerns\\HasUuids');
$traits[] = 'HasUuids';
Expand Down
2 changes: 1 addition & 1 deletion src/Lexers/ConfigLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ConfigLexer implements Lexer
{
private Container $app;

public function __construct(Container $app = null)
public function __construct(?Container $app = null)
{
$this->app = $app ?? Container::getInstance();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function addMethod(string $name, array $statements): void
$this->methods[$name] = $statements;
}

public function policy(Policy $policy = null): ?Policy
public function policy(?Policy $policy = null): ?Policy
{
if ($policy) {
$this->policy = $policy;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Statements/SendStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SendStatement

private string $subject;

public function __construct(string $mail, ?string $to, array $data, string $type, string $view = null)
public function __construct(string $mail, ?string $to, array $data, string $type, ?string $view = null)
{
$this->mail = $mail;
$this->data = $data;
Expand Down
2 changes: 1 addition & 1 deletion src/Tracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Tracer
{
private Filesystem $filesystem;

public function execute(Blueprint $blueprint, Filesystem $filesystem, array $paths = null): array
public function execute(Blueprint $blueprint, Filesystem $filesystem, ?array $paths = null): array
{
$this->filesystem = $filesystem;

Expand Down

0 comments on commit 8b39b97

Please sign in to comment.