Skip to content

Commit

Permalink
Merge $context and definition() in constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
david_smith committed Oct 15, 2024
1 parent e4841f2 commit c92b66d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Zerotoprod\DataModelFactory;

use Tests\Unit\Override\UserFactory;

/**
* Factory for Instantiating a Class.
*
Expand Down Expand Up @@ -64,7 +62,7 @@ trait Factory
*/
public function __construct(array $context = [])
{
$this->context = $context;
$this->context = array_merge($this->definition(), $context);
}

/**
Expand Down

0 comments on commit c92b66d

Please sign in to comment.