From acff8d0ce1b5a4310af6a1570c0e7ff344f8398e Mon Sep 17 00:00:00 2001 From: ThallisPHP Date: Wed, 28 Aug 2013 22:51:56 -0300 Subject: [PATCH 1/2] Simple autocompelte to PHPStorm Simple autocompelte to PHPStorm when using Faker\Factory::create() --- src/Faker/Generator.php | 110 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 3401089d..52ac98e8 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -2,6 +2,116 @@ namespace Faker; + +/** + * @property string prefix + * @property string suffix + * @property string name + * @property string firstName + * @property string lastName + * + * @property string cityPrefix + * @property string secondaryAddress + * @property string state + * @property string stateAbbr + * @property string citySuffix + * @property string streetSuffix + * @property string buildingNumber + * @property string city + * @property string streetName + * @property string streetAddress + * @property string postcode + * @property string address + * @property string country + * @property string latitude + * @property string longitude + * + * @property string phoneNumber + * + * @property string catchPhrase + * @property string bs + * @property string company + * @property string companySuffix + * + * @property string word + * @method string words + * @method string sentence + * @method string sentences + * @method string paragraph + * @method string paragraphs + * @method string text + * + * @property string email + * @property string safeEmail + * @property string freeEmail + * @property string companyEmail + * @property string freeEmailDomain + * @property string safeEmailDomain + * @property string userName + * @property string domainName + * @property string domainWord + * @property string tld + * @property string url + * @property string ipv4 + * @property string ipv6 + * + * @property string unixTime + * @property string dateTime + * @property string dateTimeAD + * @property string iso8601 + * @property string dateTimeThisCentury + * @property string dateTimeThisDecade + * @property string dateTimeThisYear + * @property string dateTimeThisMonth + * @property string amPm + * @property string dayOfMonth + * @property string dayOfWeek + * @property string month + * @property string monthName + * @property string year + * @property string century + * @property string timezone + * @method string date + * @method string time + * @method string dateTimeBetween + * + * @property string md5 + * @property string sha1 + * @property string sha256 + * @property string locale + * @property string countryCode + * @property string languageCode + * @method string boolean + * + * @property string randomDigit + * @property string randomDigitNotNull + * @property string randomLetter + * @method string randomNumber + * @method string randomFloat + * @method string randomElement + * @method string numerify + * @method string lexify + * @method string bothify + * + * @property string userAgent + * @property string chrome + * @property string firefox + * @property string safari + * @property string opera + * @property string internetExplorer + * + * @property string uuid + * + * @property string mimeType + * @property string fileExtension + * + * @property string hexcolor + * @property string rgbcolor + * @property string rgbColorAsArray + * @property string rgbCssColor + * @property string safeColorName + * @property string colorName + */ class Generator { protected $providers = array(); From b00515d647c2156ac87296f39e5d2d9ebd574ec5 Mon Sep 17 00:00:00 2001 From: ThallisPHP Date: Wed, 4 Sep 2013 00:55:31 -0300 Subject: [PATCH 2/2] More specific return types to auto complete --- src/Faker/Generator.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 52ac98e8..6d00435f 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -23,8 +23,8 @@ namespace Faker; * @property string postcode * @property string address * @property string country - * @property string latitude - * @property string longitude + * @property float latitude + * @property float longitude * * @property string phoneNumber * @@ -55,7 +55,7 @@ namespace Faker; * @property string ipv4 * @property string ipv6 * - * @property string unixTime + * @property int unixTime * @property string dateTime * @property string dateTimeAD * @property string iso8601 @@ -64,12 +64,12 @@ namespace Faker; * @property string dateTimeThisYear * @property string dateTimeThisMonth * @property string amPm - * @property string dayOfMonth - * @property string dayOfWeek - * @property string month + * @property int dayOfMonth + * @property int dayOfWeek + * @property int month * @property string monthName - * @property string year - * @property string century + * @property int year + * @property int century * @property string timezone * @method string date * @method string time @@ -81,13 +81,13 @@ namespace Faker; * @property string locale * @property string countryCode * @property string languageCode - * @method string boolean + * @method boolean boolean * - * @property string randomDigit - * @property string randomDigitNotNull + * @property int randomDigit + * @property int randomDigitNotNull * @property string randomLetter - * @method string randomNumber - * @method string randomFloat + * @method int randomNumber + * @method float randomFloat * @method string randomElement * @method string numerify * @method string lexify