etelford / faker-instrument-names
An instrument name generator for Faker.
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/etelford/faker-instrument-names
Requires
- php: ^5.3.3 || ^7.0 || ^8.0
- fzaninotto/faker: ^1.9
Requires (Dev)
- phpunit/phpunit: ^6.0 || ^9.0
This package is auto-updated.
Last update: 2025-09-29 01:50:00 UTC
README
Generate random instrument names with the help of fzaninotto/Faker.
Names of instruments were pulled and parsed from MusicBrainz.
Installation
composer.json:
"require": {
"etelford/faker-instrument-names": "*"
}
Example
Make an instance of Faker
and an instance of the InstrumentFaker
, add it as a provider and call the instrument method you want.
$faker = \Faker\Factory::create(); $generator = new \Etelford\InstrumentFaker($faker); $faker->addProvider($generator); // Get a random instrument name echo $faker->instrument; // Get a random wind instrument name echo $faker->windInstrument; // Get a random string instrument name echo $faker->stringInstrument; // Get a random percussion instrument name echo $faker->percussionInstrument; // Get a random electronic instrument name echo $faker->electronicInstrument;