Skip to content

Commit

Permalink
Fix: Do not use static in callables
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Sep 25, 2023
1 parent a6a0f53 commit 85fb5b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.0...main)

- Fixed polish license plates (#685)
- Stopped using `static` in callables in `Provider\pt_BR\PhoneNumber` (#785)

## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0)

Expand Down
6 changes: 3 additions & 3 deletions src/Faker/Provider/pt_BR/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function phone($formatted = true)
['landline', null],
]);

return call_user_func("static::{$options[0]}", $formatted, $options[1]);
return call_user_func([static::class, $options[0]], $formatted, $options[1]);
}

/**
Expand Down Expand Up @@ -135,7 +135,7 @@ public function phoneNumber()
{
$method = static::randomElement(['cellphoneNumber', 'landlineNumber']);

return call_user_func("static::$method", true);
return call_user_func([static::class, $method], true);
}

/**
Expand All @@ -145,6 +145,6 @@ public static function phoneNumberCleared()
{
$method = static::randomElement(['cellphoneNumber', 'landlineNumber']);

return call_user_func("static::$method", false);
return call_user_func([static::class, $method], false);
}
}

0 comments on commit 85fb5b3

Please sign in to comment.