Skip to content

Commit

Permalink
Refactor: Replace get_called_class() with static::class for consisten…
Browse files Browse the repository at this point in the history
…cy (#52173)
  • Loading branch information
fernandokbs authored Jul 18, 2024
1 parent 202bdc4 commit 3e07f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Factories/HasFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trait HasFactory
*/
public static function factory($count = null, $state = [])
{
$factory = static::newFactory() ?? Factory::factoryForModel(get_called_class());
$factory = static::newFactory() ?? Factory::factoryForModel(static::class);

return $factory
->count(is_numeric($count) ? $count : null)
Expand Down

0 comments on commit 3e07f5a

Please sign in to comment.