diff --git a/CHANGELOG.md b/CHANGELOG.md index 8735e63d36..ded020890b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/Faker/Provider/pt_BR/PhoneNumber.php b/src/Faker/Provider/pt_BR/PhoneNumber.php index 6717def5a5..6601658306 100644 --- a/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -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]); } /** @@ -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); } /** @@ -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); } }