From abf51cc63af2f8c7f59992e46ffb10c2378eb2da Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Tue, 18 Oct 2011 14:39:40 +0200 Subject: [PATCH] rename name provider to person provider. Closes #10. --- readme.md | 2 +- src/Faker/Factory.php | 2 +- src/Faker/Provider/{Name.php => Person.php} | 2 +- src/Faker/Provider/en_US/{Name.php => Person.php} | 4 ++-- src/Faker/Provider/fr_FR/{Name.php => Person.php} | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/Faker/Provider/{Name.php => Person.php} (94%) rename src/Faker/Provider/en_US/{Name.php => Person.php} (99%) rename src/Faker/Provider/fr_FR/{Name.php => Person.php} (98%) diff --git a/readme.md b/readme.md index 010b763a..6d78ebc4 100644 --- a/readme.md +++ b/readme.md @@ -55,7 +55,7 @@ for ($i=0; $i < 10; $i++) { Each of the generator properties (like `name`, `address`, and `lorem`) are called "formatters". A faker generator has many of them, packaged in "providers". Here is a list of the bundled formatters in the default locale. -### `Faker\Provider\en_US\Name` +### `Faker\Provider\en_US\Person` prefix // 'Ms.' suffix // 'Jr.' diff --git a/src/Faker/Factory.php b/src/Faker/Factory.php index 0ba229ad..d04c08d2 100644 --- a/src/Faker/Factory.php +++ b/src/Faker/Factory.php @@ -8,7 +8,7 @@ class Factory { const DEFAULT_LOCALE = 'en_US'; - protected static $defaultProviders = array('Name', 'Address', 'PhoneNumber', 'Company', 'Lorem', 'Internet', 'DateTime', 'Miscellaneous'); + protected static $defaultProviders = array('Person', 'Address', 'PhoneNumber', 'Company', 'Lorem', 'Internet', 'DateTime', 'Miscellaneous'); public static function create($locale = self::DEFAULT_LOCALE) { diff --git a/src/Faker/Provider/Name.php b/src/Faker/Provider/Person.php similarity index 94% rename from src/Faker/Provider/Name.php rename to src/Faker/Provider/Person.php index 3bb5c219..22239178 100644 --- a/src/Faker/Provider/Name.php +++ b/src/Faker/Provider/Person.php @@ -4,7 +4,7 @@ namespace Faker\Provider; require_once __DIR__ . '/Base.php'; -class Name extends \Faker\Provider\Base +class Person extends \Faker\Provider\Base { protected static $formats = array( '{{firstName}} {{lastName}}', diff --git a/src/Faker/Provider/en_US/Name.php b/src/Faker/Provider/en_US/Person.php similarity index 99% rename from src/Faker/Provider/en_US/Name.php rename to src/Faker/Provider/en_US/Person.php index 14372cb4..81b1eadb 100644 --- a/src/Faker/Provider/en_US/Name.php +++ b/src/Faker/Provider/en_US/Person.php @@ -2,9 +2,9 @@ namespace Faker\Provider\en_US; -require_once __DIR__ . '/../Name.php'; +require_once __DIR__ . '/../Person.php'; -class Name extends \Faker\Provider\Name +class Person extends \Faker\Provider\Person { protected static $formats = array( '{{firstName}} {{lastName}}', diff --git a/src/Faker/Provider/fr_FR/Name.php b/src/Faker/Provider/fr_FR/Person.php similarity index 98% rename from src/Faker/Provider/fr_FR/Name.php rename to src/Faker/Provider/fr_FR/Person.php index f33e7fda..861fa050 100644 --- a/src/Faker/Provider/fr_FR/Name.php +++ b/src/Faker/Provider/fr_FR/Person.php @@ -2,9 +2,9 @@ namespace Faker\Provider\fr_FR; -require_once __DIR__ . '/../Name.php'; +require_once __DIR__ . '/../Person.php'; -class Name extends \Faker\Provider\Name +class Person extends \Faker\Provider\Person { protected static $formats = array( '{{firstName}} {{lastName}}',