Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
netzknecht committed Dec 3, 2023
1 parent 0271fcd commit 3850f37
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions packages/core/database/factories/AttributeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@

class AttributeFactory extends Factory
{
private static $position = 1;

protected $model = Attribute::class;

public function definition(): array
{
return [
'attribute_group_id' => AttributeGroup::factory(),
'attribute_type' => Product::class,
'position' => self::$position++,
'name' => [
'en' => $this->faker->name(),
],
Expand Down
3 changes: 0 additions & 3 deletions packages/core/database/factories/ProductOptionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

class ProductOptionFactory extends Factory
{
private static $position = 1;

protected $model = ProductOption::class;

public function definition(): array
Expand All @@ -24,7 +22,6 @@ public function definition(): array
'label' => [
'en' => $name,
],
'position' => self::$position++,
];
}
}
6 changes: 0 additions & 6 deletions packages/core/src/Console/InstallLunar.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public function handle(): void
'en' => 'Details',
]),
'handle' => 'details',
'position' => 1,
]);

$collectionGroup = AttributeGroup::create([
Expand All @@ -148,13 +147,11 @@ public function handle(): void
'en' => 'Details',
]),
'handle' => 'collection_details',
'position' => 1,
]);

Attribute::create([
'attribute_type' => Product::class,
'attribute_group_id' => $group->id,
'position' => 1,
'name' => [
'en' => 'Name',
],
Expand All @@ -172,7 +169,6 @@ public function handle(): void
Attribute::create([
'attribute_type' => Collection::class,
'attribute_group_id' => $collectionGroup->id,
'position' => 1,
'name' => [
'en' => 'Name',
],
Expand All @@ -190,7 +186,6 @@ public function handle(): void
Attribute::create([
'attribute_type' => Product::class,
'attribute_group_id' => $group->id,
'position' => 2,
'name' => [
'en' => 'Description',
],
Expand All @@ -208,7 +203,6 @@ public function handle(): void
Attribute::create([
'attribute_type' => Collection::class,
'attribute_group_id' => $collectionGroup->id,
'position' => 2,
'name' => [
'en' => 'Description',
],
Expand Down

0 comments on commit 3850f37

Please sign in to comment.