Skip to content

Commit

Permalink
Merge pull request #297 from lara-zeus/Factory
Browse files Browse the repository at this point in the history
fix return type for Factory
  • Loading branch information
atmonshi authored Jun 6, 2024
2 parents 468d0e4 + 4d4381b commit a15e1f1
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 118 deletions.
224 changes: 112 additions & 112 deletions composer.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Models/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -46,7 +47,7 @@ public function getValuesListAttribute(): ?string
return null;
}

protected static function newFactory(): CollectionFactory
protected static function newFactory(): Factory
{
return CollectionFactory::new();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -52,7 +53,7 @@ protected static function booted(): void
});
}

protected static function newFactory(): FieldFactory
protected static function newFactory(): Factory
{
return FieldFactory::new();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/FieldResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -29,7 +30,7 @@ public function getTable()
return config('zeus-bolt.table-prefix') . 'field_responses';
}

protected static function newFactory(): FieldResponseFactory
protected static function newFactory(): Factory
{
return FieldResponseFactory::new();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -100,7 +101,7 @@ public function getRouteKeyName(): string
return 'slug';
}

protected static function newFactory(): FormFactory
protected static function newFactory(): Factory
{
return FormFactory::new();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -50,7 +51,7 @@ protected static function booted(): void
});
}

protected static function newFactory(): ResponseFactory
protected static function newFactory(): Factory
{
return ResponseFactory::new();
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace LaraZeus\Bolt\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
Expand Down Expand Up @@ -59,7 +60,7 @@ protected static function booted(): void
});
}

protected static function newFactory(): SectionFactory
protected static function newFactory(): Factory
{
return SectionFactory::new();
}
Expand Down

0 comments on commit a15e1f1

Please sign in to comment.