Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Refreshed ISO currencies (#919)
- Improved italian phone number formats
- Replaced `via.placeholder.com` with `placehold.co` in Image provider (#1013)
- Added a conditional return type to `words()` so static analysis knows `$asText` decides between `string` and `list<string>`

## [2024-11-09, v1.24.0](https://github.com/FakerPHP/Faker/compare/v1.23.1..v1.24.0)

Expand Down
2 changes: 1 addition & 1 deletion src/Faker/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
*
* @property array|string $words
*
* @method array|string words($nb = 3, $asText = false)
* @method ($asText is true ? string : list<string>) words($nb = 3, $asText = false)
*
* @property string $sentence
*
Expand Down
2 changes: 1 addition & 1 deletion src/Faker/Provider/Lorem.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function word()
* @param int $nb how many words to return
* @param bool $asText if true the sentences are returned as one string
*
* @return array|string
* @return ($asText is true ? string : list<string>)
*/
public static function words($nb = 3, $asText = false)
{
Expand Down