Skip to content

Commit

Permalink
Update Factory.php dockblock. (#9)
Browse files Browse the repository at this point in the history
* Update `Factory.php` dockblock.

* Change `$states` to `$context`

---------

Co-authored-by: david_smith <david_smith@sweetwater.com>
  • Loading branch information
zero-to-prod and david_smith authored Dec 29, 2024
1 parent 3eeda6e commit 548e652
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ class User
public $last_name;
public $address;

public static function factory(array $states = []): UserFactory
public static function factory(array $context = []): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
* return $this->instantiate();
* }
*
* public static function factory(array $states = []): UserFactory
* public static function factory(array $context = []): UserFactory
* {
* return new UserFactory($states);
* return new UserFactory($context);
* }
* }
*
Expand Down
Empty file modified test.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions tests/Unit/CallableState/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function make(): User
return $this->instantiate();
}

public static function factory(array $states = []): UserFactory
public static function factory(array $context = []): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Context/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class User
public $first_name;
public $last_name;

public static function factory(array $states): UserFactory
public static function factory(array $context): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Make/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class User
public const first_name = 'first_name';
public $first_name;

public static function factory(array $states = []): UserFactory
public static function factory(array $context = []): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Method/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class User
public $address;
public $shipping_address;

public static function factory(array $states = []): UserFactory
public static function factory(array $context = []): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Override/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class User
public const DateTime = 'DateTime';
public $DateTime;

public static function factory(array $states = []): UserFactory
public static function factory(array $context = []): UserFactory
{
return new UserFactory($states);
return new UserFactory($context);
}
}

0 comments on commit 548e652

Please sign in to comment.