From c56ed877e4360480df8c181ba8b598e52ef9ec06 Mon Sep 17 00:00:00 2001 From: Olivier Dolbeau Date: Wed, 11 Dec 2024 14:41:54 +0100 Subject: [PATCH] Add missing return type for some Generator methods --- CHANGELOG.md | 1 + src/Generator.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102ca35f71..1c151f46c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Removed functionality for populating ORM entities and models (#764) - Added a PHP version support policy (#752) - Stopped using `static` in callables in `Provider\pt_BR\PhoneNumber` (#785) +- Add missing return types in Generator (#922) ## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0) diff --git a/src/Generator.php b/src/Generator.php index ee01a41e94..bcb22b3d3d 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -752,7 +752,7 @@ public function parse($string) * * @example 'video/avi' */ - public function mimeType() + public function mimeType(): string { return $this->ext(Extension\FileExtension::class)->mimeType(); } @@ -762,7 +762,7 @@ public function mimeType() * * @example avi */ - public function fileExtension() + public function fileExtension(): string { return $this->ext(Extension\FileExtension::class)->extension(); } @@ -770,7 +770,7 @@ public function fileExtension() /** * Get a full path to a new real file on the system. */ - public function filePath() + public function filePath(): string { return $this->ext(Extension\FileExtension::class)->filePath(); }