This commit is contained in:
Torsten 2018-08-07 10:42:11 +02:00
parent 98419bd18d
commit 8a69e45efa
4919 changed files with 28311 additions and 224136 deletions

2
pfosten/vendor/fzaninotto/faker/src/Faker/Calculator/Iban.php vendored Executable file → Normal file
View file

@ -25,6 +25,8 @@ class Iban
}
/**
* @param string $match
*
* @return int
*/
private static function alphaToNumberCallback($match)

19
pfosten/vendor/fzaninotto/faker/src/Faker/Calculator/Luhn.php vendored Executable file → Normal file
View file

@ -2,8 +2,10 @@
namespace Faker\Calculator;
use InvalidArgumentException;
/**
* Utility class for generating Luhn checksum and validating a number
* Utility class for generating and validating Luhn numbers.
*
* Luhn algorithm is used to validate credit card numbers, IMEI numbers, and
* National Provider Identifier numbers.
@ -55,4 +57,19 @@ class Luhn
{
return self::checksum($number) === 0;
}
/**
* Generate a Luhn compliant number.
*
* @param string $partialValue
*
* @return string
*/
public static function generateLuhnNumber($partialValue)
{
if (!preg_match('/^\d+$/', $partialValue)) {
throw new InvalidArgumentException('Argument should be an integer.');
}
return $partialValue . Luhn::computeCheckDigit($partialValue);
}
}

4
pfosten/vendor/fzaninotto/faker/src/Faker/DefaultGenerator.php vendored Executable file → Normal file
View file

@ -17,6 +17,8 @@ class DefaultGenerator
/**
* @param string $attribute
*
* @return mixed
*/
public function __get($attribute)
{
@ -26,6 +28,8 @@ class DefaultGenerator
/**
* @param string $method
* @param array $attributes
*
* @return mixed
*/
public function __call($method, $attributes)
{

0
pfosten/vendor/fzaninotto/faker/src/Faker/Documentor.php vendored Executable file → Normal file
View file

4
pfosten/vendor/fzaninotto/faker/src/Faker/Factory.php vendored Executable file → Normal file
View file

@ -6,11 +6,11 @@ class Factory
{
const DEFAULT_LOCALE = 'en_US';
protected static $defaultProviders = array('Address', 'Barcode', 'Biased', 'Color', 'Company', 'DateTime', 'File', 'Image', 'Internet', 'Lorem', 'Miscellaneous', 'Payment', 'Person', 'PhoneNumber', 'Text', 'UserAgent', 'Uuid');
protected static $defaultProviders = array('Address', 'Barcode', 'Biased', 'Color', 'Company', 'DateTime', 'File', 'HtmlLorem', 'Image', 'Internet', 'Lorem', 'Miscellaneous', 'Payment', 'Person', 'PhoneNumber', 'Text', 'UserAgent', 'Uuid');
/**
* Create a new generator
*
*
* @param string $locale
* @return Generator
*/

54
pfosten/vendor/fzaninotto/faker/src/Faker/Generator.php vendored Executable file → Normal file
View file

@ -4,11 +4,14 @@ namespace Faker;
/**
* @property string $name
* @method string name(string $gender = null)
* @property string $firstName
* @method string firstName(string $gender = null)
* @property string $firstNameMale
* @property string $firstNameFemale
* @property string $lastName
* @property string $title
* @method string title(string $gender = null)
* @property string $titleMale
* @property string $titleFemale
*
@ -40,7 +43,7 @@ namespace Faker;
* @method string creditCardNumber($type = null, $formatted = false, $separator = '-')
* @property \DateTime $creditCardExpirationDate
* @property string $creditCardExpirationDateString
* @property string $creditCardDetails
* @property array $creditCardDetails
* @property string $bankAccountNumber
* @method string iban($countryCode = null, $prefix = '', $length = null)
* @property string $swiftBicNumber
@ -91,16 +94,31 @@ namespace Faker;
* @property \DateTime $dateTimeThisYear
* @property \DateTime $dateTimeThisMonth
* @property string $amPm
* @property int $dayOfMonth
* @property int $dayOfWeek
* @property int $month
* @property string $dayOfMonth
* @property string $dayOfWeek
* @property string $month
* @property string $monthName
* @property int $year
* @property int $century
* @property string $year
* @property string $century
* @property string $timezone
* @method string amPm($max = 'now')
* @method string date($format = 'Y-m-d', $max = 'now')
* @method string dayOfMonth($max = 'now')
* @method string dayOfWeek($max = 'now')
* @method string iso8601($max = 'now')
* @method string month($max = 'now')
* @method string monthName($max = 'now')
* @method string time($format = 'H:i:s', $max = 'now')
* @method int unixTime($max = 'now')
* @method string year($max = 'now')
* @method \DateTime dateTime($max = 'now', $timezone = null)
* @method \DateTime dateTimeAd($max = 'now', $timezone = null)
* @method \DateTime dateTimeBetween($startDate = '-30 years', $endDate = 'now')
* @method \DateTime dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null)
* @method \DateTime dateTimeThisCentury($max = 'now', $timezone = null)
* @method \DateTime dateTimeThisDecade($max = 'now', $timezone = null)
* @method \DateTime dateTimeThisYear($max = 'now', $timezone = null)
* @method \DateTime dateTimeThisMonth($max = 'now', $timezone = null)
*
* @property string $md5
* @property string $sha1
@ -110,7 +128,7 @@ namespace Faker;
* @property string $countryISOAlpha3
* @property string $languageCode
* @property string $currencyCode
* @property boolean boolean
* @property boolean $boolean
* @method boolean boolean($chanceOfGettingTrue = 50)
*
* @property int $randomDigit
@ -122,7 +140,7 @@ namespace Faker;
* @method int numberBetween($min = 0, $max = 2147483647)
* @method float randomFloat($nbMaxDecimals = null, $min = 0, $max = null)
* @method mixed randomElement(array $array = array('a', 'b', 'c'))
* @method array randomElements(array $array = array('a', 'b', 'c'), $count = 1)
* @method array randomElements(array $array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false)
* @method array|string shuffle($arg = '')
* @method array shuffleArray(array $array = array())
* @method string shuffleString($string = '', $encoding = 'UTF-8')
@ -135,6 +153,7 @@ namespace Faker;
* @method string toUpper($string = '')
* @method Generator optional($weight = 0.5, $default = null)
* @method Generator unique($reset = false, $maxRetries = 10000)
* @method Generator valid($validator = null, $maxRetries = 10000)
*
* @method integer biasedNumberBetween($min = 0, $max = 100, $function = 'sqrt')
*
@ -156,8 +175,8 @@ namespace Faker;
* @property string $fileExtension
* @method string file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)
*
* @method string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null)
* @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true)
* @method string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
* @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null)
*
* @property string $hexColor
* @property string $safeHexColor
@ -166,6 +185,9 @@ namespace Faker;
* @property string $rgbCssColor
* @property string $safeColorName
* @property string $colorName
*
* @method string randomHtml($maxDepth = 4, $maxWidth = 4)
*
*/
class Generator
{
@ -187,7 +209,11 @@ class Generator
if ($seed === null) {
mt_srand();
} else {
mt_srand((int) $seed);
if (PHP_VERSION_ID < 70100) {
mt_srand((int) $seed);
} else {
mt_srand((int) $seed, MT_RAND_PHP);
}
}
}
@ -197,6 +223,8 @@ class Generator
}
/**
* @param string $formatter
*
* @return Callable
*/
public function getFormatter($formatter)
@ -232,6 +260,8 @@ class Generator
/**
* @param string $attribute
*
* @return mixed
*/
public function __get($attribute)
{
@ -241,6 +271,8 @@ class Generator
/**
* @param string $method
* @param array $attributes
*
* @return mixed
*/
public function __call($method, $attributes)
{

0
pfosten/vendor/fzaninotto/faker/src/Faker/Guesser/Name.php vendored Executable file → Normal file
View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/ORM/CakePHP/Populator.php vendored Executable file → Normal file
View file

View file

View file

@ -3,8 +3,7 @@
namespace Faker\ORM\Doctrine;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
/**
* Service class for populating a table through a Doctrine Entity class.
@ -120,13 +119,26 @@ class EntityPopulator
$relatedClass = $this->class->getAssociationTargetClass($assocName);
$unique = $optional = false;
$mappings = $this->class->getAssociationMappings();
foreach ($mappings as $mapping) {
if ($mapping['targetEntity'] == $relatedClass) {
if ($mapping['type'] == ClassMetadata::ONE_TO_ONE) {
$unique = true;
$optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false;
break;
if ($this->class instanceof \Doctrine\ORM\Mapping\ClassMetadata) {
$mappings = $this->class->getAssociationMappings();
foreach ($mappings as $mapping) {
if ($mapping['targetEntity'] == $relatedClass) {
if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadata::ONE_TO_ONE) {
$unique = true;
$optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false;
break;
}
}
}
} elseif ($this->class instanceof \Doctrine\ODM\MongoDB\Mapping\ClassMetadata) {
$mappings = $this->class->associationMappings;
foreach ($mappings as $mapping) {
if ($mapping['targetDocument'] == $relatedClass) {
if ($mapping['type'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::ONE && $mapping['association'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::REFERENCE_ONE) {
$unique = true;
$optional = isset($mapping['nullable']) ? $mapping['nullable'] : false;
break;
}
}
}
}
@ -199,7 +211,7 @@ class EntityPopulator
}
// Try a standard setter if it's available, otherwise fall back on reflection
$setter = sprintf("set%s", ucfirst($field));
if (method_exists($obj, $setter)) {
if (is_callable(array($obj, $setter))) {
$obj->$setter($value);
} else {
$this->class->reflFields[$field]->setValue($obj, $value);
@ -216,18 +228,18 @@ class EntityPopulator
}
/**
* @param EntityManagerInterface $manager
* @param ObjectManager $manager
* @return int|null
*/
private function generateId($obj, $column, EntityManagerInterface $manager)
private function generateId($obj, $column, ObjectManager $manager)
{
/* @var $repository \Doctrine\ORM\EntityRepository */
/* @var $repository \Doctrine\Common\Persistence\ObjectRepository */
$repository = $manager->getRepository(get_class($obj));
$result = $repository->createQueryBuilder('e')
->select(sprintf('e.%s', $column))
->getQuery()
->getResult();
$ids = array_map('current', $result);
->execute();
$ids = array_map('current', $result->toArray());
$id = null;
do {

View file

View file

View file

View file

View file

@ -29,11 +29,11 @@ class ColumnTypeGuesser
return function () use ($generator) {
return $generator->dateTime;
};
} else {
return function () use ($generator) {
return $generator->dateTimeAD;
};
}
return function () use ($generator) {
return $generator->dateTimeAD;
};
}
$type = $column->getType();
switch ($type) {

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/ORM/Propel/Populator.php vendored Executable file → Normal file
View file

View file

@ -29,11 +29,11 @@ class ColumnTypeGuesser
return function () use ($generator) {
return $generator->dateTime;
};
} else {
return function () use ($generator) {
return $generator->dateTimeAD;
};
}
return function () use ($generator) {
return $generator->dateTimeAD;
};
}
$type = $column->getType();
switch ($type) {

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/Populator.php vendored Executable file → Normal file
View file

View file

View file

@ -151,23 +151,23 @@ class EntityPopulator
$formatters[$fieldName] = function ($inserted) use ($required, $entityName, $locator) {
if (!empty($inserted[$entityName])) {
return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->getId();
} else {
if ($required && $this->useExistingData) {
// We did not add anything like this, but it's required,
// So let's find something existing in DB.
$mapper = $this->locator->mapper($entityName);
$records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray();
if (empty($records)) {
return null;
}
$id = $records[mt_rand(0, count($records) - 1)]['id'];
return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->get('id');
}
return $id;
} else {
if ($required && $this->useExistingData) {
// We did not add anything like this, but it's required,
// So let's find something existing in DB.
$mapper = $locator->mapper($entityName);
$records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray();
if (empty($records)) {
return null;
}
$id = $records[mt_rand(0, count($records) - 1)]['id'];
return $id;
}
return null;
};
}

0
pfosten/vendor/fzaninotto/faker/src/Faker/ORM/Spot/Populator.php vendored Executable file → Normal file
View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Address.php vendored Executable file → Normal file
View file

6
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Barcode.php vendored Executable file → Normal file
View file

@ -17,10 +17,14 @@ class Barcode extends Base
/**
* Utility function for computing EAN checksums
*
* @param string $input
*
* @return integer
*/
protected static function eanChecksum($input)
{
$sequence = (strlen($input) - 1) === 8 ? array(3, 1) : array(1, 3);
$sequence = (strlen($input) + 1) === 8 ? array(3, 1) : array(1, 3);
$sums = 0;
foreach (str_split($input) as $n => $digit) {
$sums += $digit * $sequence[$n % 2];

57
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Base.php vendored Executable file → Normal file
View file

@ -110,6 +110,9 @@ class Base
if (null === $max) {
$max = static::randomNumber();
if ($min > $max) {
$max = $min;
}
}
if ($min > $max) {
@ -136,6 +139,18 @@ class Base
$max = $int1 < $int2 ? $int2 : $int1;
return mt_rand($min, $max);
}
/**
* Returns the passed value
*
* @param mixed $value
*
* @return mixed
*/
public static function passthrough($value)
{
return $value;
}
/**
* Returns a random letter from a to z
@ -158,18 +173,29 @@ class Base
/**
* Returns randomly ordered subsequence of $count elements from a provided array
*
* @param array $array Array to take elements from. Defaults to a-f
* @param integer $count Number of elements to take.
* @param array $array Array to take elements from. Defaults to a-f
* @param integer $count Number of elements to take.
* @param boolean $allowDuplicates Allow elements to be picked several times. Defaults to false
* @throws \LengthException When requesting more elements than provided
*
* @return array New array with $count elements from $array
*/
public static function randomElements(array $array = array('a', 'b', 'c'), $count = 1)
public static function randomElements($array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false)
{
$allKeys = array_keys($array);
$traversables = array();
if ($array instanceof \Traversable) {
foreach ($array as $element) {
$traversables[] = $element;
}
}
$arr = count($traversables) ? $traversables : $array;
$allKeys = array_keys($arr);
$numKeys = count($allKeys);
if ($numKeys < $count) {
if (!$allowDuplicates && $numKeys < $count) {
throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys));
}
@ -179,12 +205,15 @@ class Base
while ($numElements < $count) {
$num = mt_rand(0, $highKey);
if (isset($keys[$num])) {
continue;
if (!$allowDuplicates) {
if (isset($keys[$num])) {
continue;
}
$keys[$num] = true;
}
$keys[$num] = true;
$elements[] = $array[$allKeys[$num]];
$elements[] = $arr[$allKeys[$num]];
$numElements++;
}
@ -199,7 +228,7 @@ class Base
*/
public static function randomElement($array = array('a', 'b', 'c'))
{
if (!$array) {
if (!$array || ($array instanceof \Traversable && !count($array))) {
return null;
}
$elements = static::randomElements($array, 1);
@ -253,7 +282,7 @@ class Base
* Returns a shuffled version of the array.
*
* This function does not mutate the original array. It uses the
* Fisher–Yates algorithm, which is unbiaised, together with a Mersenne
* Fisher–Yates algorithm, which is unbiased, together with a Mersenne
* twister random generator. This function is therefore more random than
* PHP's shuffle() function, and it is seedable.
*
@ -269,7 +298,7 @@ class Base
$shuffledArray = array();
$i = 0;
reset($array);
while (list($key, $value) = each($array)) {
foreach ($array as $key => $value) {
if ($i == 0) {
$j = 0;
} else {
@ -290,7 +319,7 @@ class Base
* Returns a shuffled version of the string.
*
* This function does not mutate the original string. It uses the
* Fisher–Yates algorithm, which is unbiaised, together with a Mersenne
* Fisher–Yates algorithm, which is unbiased, together with a Mersenne
* twister random generator. This function is therefore more random than
* PHP's shuffle() function, and it is seedable. Additionally, it is
* UTF8 safe if the mb extension is available.
@ -415,7 +444,7 @@ class Base
* Regex delimiters '/.../' and begin/end markers '^...$' are ignored.
*
* Only supports a small subset of the regex syntax. For instance,
* unicode, negated classes, unbouned ranges, subpatterns, back references,
* unicode, negated classes, unbounded ranges, subpatterns, back references,
* assertions, recursive patterns, and comments are not supported. Escaping
* support is extremely fragile.
*

4
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Biased.php vendored Executable file → Normal file
View file

@ -25,7 +25,7 @@ class Biased extends Base
$x = mt_rand() / mt_getrandmax();
$y = mt_rand() / (mt_getrandmax() + 1);
} while (call_user_func($function, $x) < $y);
return floor($x * ($max - $min + 1) + $min);
}
@ -35,7 +35,7 @@ class Biased extends Base
*
* @return integer
*/
protected static function unbiased($x)
protected static function unbiased()
{
return 1;
}

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Color.php vendored Executable file → Normal file
View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Company.php vendored Executable file → Normal file
View file

89
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php vendored Executable file → Normal file
View file

@ -6,6 +6,12 @@ class DateTime extends Base
{
protected static $century = array('I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII','XVIII','XIX','XX','XXI');
protected static $defaultTimezone = null;
/**
* @param string|float|int $max
* @return int|false
*/
protected static function getMaxTimestamp($max = 'now')
{
if (is_numeric($max)) {
@ -36,7 +42,7 @@ class DateTime extends Base
* Get a datetime object for a date between January 1, 1970 and now
*
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get`
* @param string $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('2005-08-16 20:39:21')
* @return \DateTime
* @see http://php.net/manual/en/timezones.php
@ -46,7 +52,7 @@ class DateTime extends Base
{
return static::setTimezone(
new \DateTime('@' . static::unixTime($max)),
(null === $timezone ? date_default_timezone_get() : $timezone)
$timezone
);
}
@ -54,7 +60,7 @@ class DateTime extends Base
* Get a datetime object for a date between January 1, 001 and now
*
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get`
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('1265-03-22 21:15:52')
* @return \DateTime
* @see http://php.net/manual/en/timezones.php
@ -62,9 +68,10 @@ class DateTime extends Base
*/
public static function dateTimeAD($max = 'now', $timezone = null)
{
$min = (PHP_INT_SIZE>4 ? -62135597361 : -PHP_INT_MAX);
return static::setTimezone(
new \DateTime('@' . mt_rand(-62135597361, static::getMaxTimestamp($max))),
(null === $timezone ? date_default_timezone_get() : $timezone)
new \DateTime('@' . mt_rand($min, static::getMaxTimestamp($max))),
$timezone
);
}
@ -112,7 +119,7 @@ class DateTime extends Base
*
* @param \DateTime|string $startDate Defaults to 30 years ago
* @param \DateTime|string $endDate Defaults to "now"
* @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get`
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('1999-02-02 11:42:52')
* @return \DateTime
* @see http://php.net/manual/en/timezones.php
@ -131,7 +138,7 @@ class DateTime extends Base
return static::setTimezone(
new \DateTime('@' . $timestamp),
(null === $timezone ? date_default_timezone_get() : $timezone)
$timezone
);
}
@ -142,7 +149,7 @@ class DateTime extends Base
*
* @param string $date Defaults to 30 years ago
* @param string $interval Defaults to 5 days after
* @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get`
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days')
* @return \DateTime
* @see http://php.net/manual/en/timezones.php
@ -154,55 +161,59 @@ class DateTime extends Base
$datetime = $date instanceof \DateTime ? $date : new \DateTime($date);
$otherDatetime = clone $datetime;
$otherDatetime->add($intervalObject);
$begin = $datetime > $otherDatetime ? $otherDatetime : $datetime;
$end = $datetime===$begin ? $otherDatetime : $datetime;
return static::dateTimeBetween(
$begin,
$end,
(null === $timezone ? date_default_timezone_get() : $timezone)
$timezone
);
}
/**
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('1964-04-04 11:02:02')
* @return \DateTime
*/
public static function dateTimeThisCentury($max = 'now')
public static function dateTimeThisCentury($max = 'now', $timezone = null)
{
return static::dateTimeBetween('-100 year', $max);
return static::dateTimeBetween('-100 year', $max, $timezone);
}
/**
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('2010-03-10 05:18:58')
* @return \DateTime
*/
public static function dateTimeThisDecade($max = 'now')
public static function dateTimeThisDecade($max = 'now', $timezone = null)
{
return static::dateTimeBetween('-10 year', $max);
return static::dateTimeBetween('-10 year', $max, $timezone);
}
/**
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('2011-09-19 09:24:37')
* @return \DateTime
*/
public static function dateTimeThisYear($max = 'now')
public static function dateTimeThisYear($max = 'now', $timezone = null)
{
return static::dateTimeBetween('-1 year', $max);
return static::dateTimeBetween('-1 year', $max, $timezone);
}
/**
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example DateTime('2011-10-05 12:51:46')
* @return \DateTime
*/
public static function dateTimeThisMonth($max = 'now')
public static function dateTimeThisMonth($max = 'now', $timezone = null)
{
return static::dateTimeBetween('-1 month', $max);
return static::dateTimeBetween('-1 month', $max, $timezone);
}
/**
@ -257,8 +268,8 @@ class DateTime extends Base
/**
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
* @return int
* @example 1673
* @return string
* @example '1673'
*/
public static function year($max = 'now')
{
@ -285,9 +296,45 @@ class DateTime extends Base
/**
* Internal method to set the time zone on a DateTime.
*
* @param \DateTime $dt
* @param string|null $timezone
*
* @return \DateTime
*/
private static function setTimezone(\DateTime $dt, $timezone)
{
return $dt->setTimezone(new \DateTimeZone($timezone));
return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone)));
}
/**
* Sets default time zone.
*
* @param string $timezone
*
* @return void
*/
public static function setDefaultTimezone($timezone = null)
{
static::$defaultTimezone = $timezone;
}
/**
* Gets default time zone.
*
* @return string|null
*/
public static function getDefaultTimezone()
{
return static::$defaultTimezone;
}
/**
* @param string|null $timezone
* @return null|string
*/
private static function resolveTimezone($timezone)
{
return ((null === $timezone) ? ((null === static::$defaultTimezone) ? date_default_timezone_get() : static::$defaultTimezone) : $timezone);
}
}

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/File.php vendored Executable file → Normal file
View file

31
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Image.php vendored Executable file → Normal file
View file

@ -18,16 +18,25 @@ class Image extends Base
* Set randomize to false to remove the random GET parameter at the end of the url.
*
* @example 'http://lorempixel.com/640/480/?12345'
*
* @param integer $width
* @param integer $height
* @param string|null $category
* @param bool $randomize
* @param string|null $word
* @param bool $gray
*
* @return string
*/
public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
{
$baseUrl = "http://lorempixel.com/";
$baseUrl = "https://lorempixel.com/";
$url = "{$width}/{$height}/";
if ($gray) {
$url = "gray/" . $url;
}
if ($category) {
if (!in_array($category, static::$categories)) {
throw new \InvalidArgumentException(sprintf('Unknown image category "%s"', $category));
@ -74,9 +83,16 @@ class Image extends Base
$fp = fopen($filepath, 'w');
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fp);
$success = curl_exec($ch);
curl_close($ch);
$success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200;
fclose($fp);
curl_close($ch);
if (!$success) {
unlink($filepath);
// could not contact the distant URL or HTTP error - fail silently.
return false;
}
} elseif (ini_get('allow_url_fopen')) {
// use remote fopen() via copy()
$success = copy($url, $filepath);
@ -84,11 +100,6 @@ class Image extends Base
return new \RuntimeException('The image formatter downloads an image from a remote HTTP server. Therefore, it requires that PHP can request remote hosts, either via cURL or fopen()');
}
if (!$success) {
// could not contact the distant URL or HTTP error - fail silently.
return false;
}
return $fullPath ? $filepath : $filename;
}
}

43
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Internet.php vendored Executable file → Normal file
View file

@ -2,7 +2,7 @@
namespace Faker\Provider;
class Internet extends \Faker\Provider\Base
class Internet extends Base
{
protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com');
protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org');
@ -36,7 +36,7 @@ class Internet extends \Faker\Provider\Base
public function email()
{
$format = static::randomElement(static::$emailFormats);
return $this->generator->parse($format);
}
@ -93,7 +93,18 @@ class Internet extends \Faker\Provider\Base
$format = static::randomElement(static::$userNameFormats);
$username = static::bothify($this->generator->parse($format));
return strtolower(static::transliterate($username));
$username = strtolower(static::transliterate($username));
// check if transliterate() didn't support the language and removed all letters
if (trim($username, '._') === '') {
throw new \Exception('userName failed with the selected locale. Try a different locale or activate the "intl" PHP extension.');
}
// clean possible trailing dots from first/last names
$username = str_replace('..', '.', $username);
$username = rtrim($username, '.');
return $username;
}
/**
* @example 'fY4èHdZv68'
@ -120,7 +131,17 @@ class Internet extends \Faker\Provider\Base
{
$lastName = $this->generator->format('lastName');
return strtolower(static::transliterate($lastName));
$lastName = strtolower(static::transliterate($lastName));
// check if transliterate() didn't support the language and removed all letters
if (trim($lastName, '._') === '') {
throw new \Exception('domainWord failed with the selected locale. Try a different locale or activate the "intl" PHP extension.');
}
// clean possible trailing dot from last name
$lastName = rtrim($lastName, '.');
return $lastName;
}
/**
@ -185,13 +206,11 @@ class Internet extends \Faker\Provider\Base
{
if (static::numberBetween(0, 1) === 0) {
// 10.x.x.x range
$ip = long2ip(static::numberBetween(167772160, 184549375));
} else {
// 192.168.x.x range
$ip = long2ip(static::numberBetween(3232235520, 3232301055));
return long2ip(static::numberBetween(ip2long("10.0.0.0"), ip2long("10.255.255.255")));
}
return $ip;
// 192.168.x.x range
return long2ip(static::numberBetween(ip2long("192.168.0.0"), ip2long("192.168.255.255")));
}
/**
@ -209,8 +228,12 @@ class Internet extends \Faker\Provider\Base
protected static function transliterate($string)
{
if (0 === preg_match('/[^A-Za-z0-9_.]/', $string)) {
return $string;
}
$transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;';
if (function_exists('transliterator_transliterate') && $transliterator = \Transliterator::create($transId)) {
if (class_exists('Transliterator') && $transliterator = \Transliterator::create($transId)) {
$transString = $transliterator->transliterate($string);
} else {
$transString = static::toAscii($string);

64
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Lorem.php vendored Executable file → Normal file
View file

@ -156,53 +156,41 @@ class Lorem extends Base
* Generate a text string.
* Depending on the $maxNbChars, returns a string made of words, sentences, or paragraphs.
*
* @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.'
* @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.'
*
* @param integer $maxNbChars Maximum number of characters the text should contain (minimum 5)
*
* @return string
*/
public static function text($maxNbChars = 200)
{
$text = array();
if ($maxNbChars < 5) {
throw new \InvalidArgumentException('text() can only generate text of at least 5 characters');
} elseif ($maxNbChars < 25) {
// join words
while (empty($text)) {
$size = 0;
// determine how many words are needed to reach the $maxNbChars once;
while ($size < $maxNbChars) {
$word = ($size ? ' ' : '') . static::word();
$text []= $word;
$size += strlen($word);
}
array_pop($text);
}
$type = ($maxNbChars < 25) ? 'word' : (($maxNbChars < 100) ? 'sentence' : 'paragraph');
$text = array();
while (empty($text)) {
$size = 0;
// until $maxNbChars is reached
while ($size < $maxNbChars) {
$word = ($size ? ' ' : '') . static::$type();
$text[] = $word;
$size += strlen($word);
}
$text[0][0] = static::toUpper($text[0][0]);
array_pop($text);
}
if ($type === 'word') {
// capitalize first letter
$text[0] = ucwords($text[0]);
// end sentence with full stop
$text[count($text) - 1] .= '.';
} elseif ($maxNbChars < 100) {
// join sentences
while (empty($text)) {
$size = 0;
// determine how many sentences are needed to reach the $maxNbChars once;
while ($size < $maxNbChars) {
$sentence = ($size ? ' ' : '') . static::sentence();
$text []= $sentence;
$size += strlen($sentence);
}
array_pop($text);
}
} else {
// join paragraphs
while (empty($text)) {
$size = 0;
// determine how many paragraphs are needed to reach the $maxNbChars once;
while ($size < $maxNbChars) {
$paragraph = ($size ? "\n" : '') . static::paragraph();
$text []= $paragraph;
$size += strlen($paragraph);
}
array_pop($text);
}
}
return implode($text, '');

79
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php vendored Executable file → Normal file
View file

@ -4,6 +4,29 @@ namespace Faker\Provider;
class Miscellaneous extends Base
{
/**
* @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
* On date of 2017-03-26
*
* U+1F600 - U+1F637 as their UTF-8 Pairings
*/
protected static $emoji = array(
'\uD83D\uDE00', '\uD83D\uDE01', '\uD83D\uDE02', '\uD83D\uDE03',
'\uD83D\uDE04', '\uD83D\uDE05', '\uD83D\uDE06', '\uD83D\uDE07',
'\uD83D\uDE08', '\uD83D\uDE09', '\uD83D\uDE0A', '\uD83D\uDE0B',
'\uD83D\uDE0C', '\uD83D\uDE0D', '\uD83D\uDE0E', '\uD83D\uDE0F',
'\uD83D\uDE10', '\uD83D\uDE11', '\uD83D\uDE12', '\uD83D\uDE13',
'\uD83D\uDE14', '\uD83D\uDE15', '\uD83D\uDE16', '\uD83D\uDE17',
'\uD83D\uDE18', '\uD83D\uDE19', '\uD83D\uDE1A', '\uD83D\uDE1B',
'\uD83D\uDE1C', '\uD83D\uDE1D', '\uD83D\uDE1E', '\uD83D\uDE1F',
'\uD83D\uDE20', '\uD83D\uDE21', '\uD83D\uDE22', '\uD83D\uDE23',
'\uD83D\uDE24', '\uD83D\uDE25', '\uD83D\uDE26', '\uD83D\uDE27',
'\uD83D\uDE28', '\uD83D\uDE29', '\uD83D\uDE2A', '\uD83D\uDE2B',
'\uD83D\uDE2C', '\uD83D\uDE2D', '\uD83D\uDE2E', '\uD83D\uDE2F',
'\uD83D\uDE30', '\uD83D\uDE31', '\uD83D\uDE32', '\uD83D\uDE33',
'\uD83D\uDE34', '\uD83D\uDE35', '\uD83D\uDE36', '\uD83D\uDE37',
);
/**
* @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
* On date of 2016-04-22
@ -178,34 +201,39 @@ class Miscellaneous extends Base
);
/**
* @link http://en.wikipedia.org/wiki/ISO_4217
* On date of 2015-01-10
* @link https://en.wikipedia.org/wiki/ISO_4217
* On date of 2017-07-07
*
* With the following exceptions:
* SVC has been replaced by the USD in 2001: https://en.wikipedia.org/wiki/Salvadoran_col%C3%B3n
* ZWL has been suspended since 2009: https://en.wikipedia.org/wiki/Zimbabwean_dollar
*/
protected static $currencyCode = array(
'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN',
'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL',
'BSD', 'BTC', 'BTN', 'BWP', 'BYR', 'BZD', 'CAD', 'CDF', 'CHF', 'CLF',
'CLP', 'CNY', 'COP', 'CRC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP',
'DZD', 'EEK', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL',
'GGP', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK',
'HTG', 'HUF', 'IDR', 'ILS', 'IMP', 'INR', 'IQD', 'IRR', 'ISK', 'JEP',
'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD',
'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LVL', 'LYD',
'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MTL', 'MUR',
'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR',
'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR',
'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD',
'SHP', 'SLL', 'SOS', 'SRD', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TJS',
'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD',
'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XCD',
'XDR', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMK', 'ZMW', 'ZWL'
'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLP', 'CNY',
'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD',
'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP',
'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR',
'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS',
'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR',
'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP',
'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO',
'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN',
'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG',
'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL',
'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH',
'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD',
'XOF', 'XPF', 'YER', 'ZAR', 'ZMW',
);
/**
* Return a boolean, true or false
* Return a boolean, true or false.
*
* @param int $chanceOfGettingTrue Between 0 (always get false) and 100 (always get true)
*
* @param integer $chanceOfGettingTrue Between 0 (always get false) and 100 (always get true).
* @return bool
*
* @example true
*/
public static function boolean($chanceOfGettingTrue = 50)
@ -247,6 +275,7 @@ class Miscellaneous extends Base
/**
* @example 'FR'
*
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
*/
public static function countryCode()
@ -256,6 +285,7 @@ class Miscellaneous extends Base
/**
* @example 'FRA'
*
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
*/
public static function countryISOAlpha3()
@ -273,10 +303,21 @@ class Miscellaneous extends Base
/**
* @example 'EUR'
*
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
*/
public static function currencyCode()
{
return static::randomElement(static::$currencyCode);
}
/**
* Returns an encoded Unicode Character between U+1F600 and U+1F637.
*
* @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
*/
public static function emoji()
{
return json_decode('"' . static::randomElement(static::$emoji) . '"');
}
}

51
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php vendored Executable file → Normal file
View file

@ -12,32 +12,44 @@ class Payment extends Base
protected static $cardVendors = array(
'Visa', 'Visa', 'Visa', 'Visa', 'Visa',
'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard',
'American Express', 'Discover Card'
'American Express', 'Discover Card', 'Visa Retired'
);
// see http://en.wikipedia.org/wiki/Bank_card_number for a reference of existing prefixes
/**
* @var array List of card brand masks for generating valid credit card numbers
* @see https://en.wikipedia.org/wiki/Payment_card_number Reference for existing prefixes
* @see https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html MasterCard 2017 2-Series BIN Expansion
*/
protected static $cardParams = array(
'Visa' => array(
"4539########",
"4539###########",
"4556########",
"4556###########",
"4916########",
"4916###########",
"4532########",
"4532###########",
"4929########",
"4929###########",
"40240071####",
"40240071#######",
"4485########",
"4485###########",
"4716########",
"4716###########",
"4###########",
"4##############"
),
'Visa Retired' => array(
"4539########",
"4556########",
"4916########",
"4532########",
"4929########",
"40240071####",
"4485########",
"4716########",
"4###########",
),
'MasterCard' => array(
"2221###########",
"23#############",
"24#############",
"25#############",
"26#############",
"2720###########",
"51#############",
"52#############",
"53#############",
@ -76,6 +88,7 @@ class Payment extends Base
'DO' => array(array('c', 4), array('n', 20)),
'EE' => array(array('n', 2), array('n', 2), array('n', 11), array('n', 1)),
'ES' => array(array('n', 4), array('n', 4), array('n', 1), array('n', 1), array('n', 10)),
'FI' => array(array('n', 6), array('n', 7), array('n', 1)),
'FR' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)),
'GB' => array(array('a', 4), array('n', 6), array('n', 8)),
'GE' => array(array('a', 2), array('n', 16)),
@ -211,7 +224,7 @@ class Payment extends Base
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function iban($countryCode, $prefix = '', $length = null)
public static function iban($countryCode = null, $prefix = '', $length = null)
{
$countryCode = is_null($countryCode) ? self::randomKey(self::$ibanFormats) : strtoupper($countryCode);
@ -254,25 +267,11 @@ class Payment extends Base
}
}
$result = static::addBankCodeChecksum($result, $countryCode);
$checksum = Iban::checksum($countryCode . '00' . $result);
return $countryCode . $checksum . $result;
}
/**
* Calculates a checksum for the national bank and branch code part in the IBAN.
*
* @param string $iban randomly generated $iban
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @return string IBAN with one character altered to a proper checksum
*/
protected static function addBankCodeChecksum($iban, $countryCode = '')
{
return $iban;
}
/**
* Return the String of a SWIFT/BIC number
*

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Person.php vendored Executable file → Normal file
View file

2
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/PhoneNumber.php vendored Executable file → Normal file
View file

@ -22,7 +22,7 @@ class PhoneNumber extends Base
*/
public function e164PhoneNumber()
{
$formats = array('+#############');
$formats = array('+%############');
return static::numerify($this->generator->parse(static::randomElement($formats)));
}

5
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Text.php vendored Executable file → Normal file
View file

@ -40,7 +40,6 @@ abstract class Text extends Base
throw new \InvalidArgumentException('indexSize must be at most 5');
}
$words = $this->getConsecutiveWords($indexSize);
$result = array();
$resultLength = 0;
@ -129,7 +128,7 @@ abstract class Text extends Base
protected static function validStart($word)
{
$isValid = true;
if (self::$textStartsWithUppercase) {
if (static::$textStartsWithUppercase) {
$isValid = preg_match('/^\p{Lu}/u', $word);
}
return $isValid;
@ -137,6 +136,6 @@ abstract class Text extends Base
protected static function appendEnd($text)
{
return $text.'.';
return preg_replace("/([ ,-:;\x{2013}\x{2014}]+$)/us", '', $text).'.';
}
}

3
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/UserAgent.php vendored Executable file → Normal file
View file

@ -108,7 +108,7 @@ class UserAgent extends Base
} else {
$ver = mt_rand(4, 5) . '.0.' . mt_rand(1, 5);
}
$mobileDevices = array(
'iPhone; CPU iPhone OS',
'iPad; CPU OS'
@ -122,7 +122,6 @@ class UserAgent extends Base
return "Mozilla/5.0 " . static::randomElement($platforms);
}
/**
* Generate Opera user agent

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/Uuid.php vendored Executable file → Normal file
View file

View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Person.php vendored Executable file → Normal file
View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/ar_JO/Text.php vendored Executable file → Normal file
View file

View file

11
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Company.php vendored Executable file → Normal file
View file

@ -2,6 +2,8 @@
namespace Faker\Provider\ar_SA;
use Faker\Calculator\Luhn;
class Company extends \Faker\Provider\Company
{
protected static $formats = array(
@ -60,4 +62,13 @@ class Company extends \Faker\Provider\Company
return join($result, ' ');
}
/**
* example 7001010101
**/
public static function companyIdNumber()
{
$partialValue = static::numerify(700 . str_repeat('#', 6));
return Luhn::generateLuhnNumber($partialValue);
}
}

View file

54
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Person.php vendored Executable file → Normal file
View file

@ -2,6 +2,8 @@
namespace Faker\Provider\ar_SA;
use Faker\Calculator\Luhn;
class Person extends \Faker\Provider\Person
{
protected static $maleNameFormats = array(
@ -90,59 +92,27 @@ class Person extends \Faker\Provider\Person
*/
public static function idNumber()
{
$firstDigit = static::numberBetween(1, 2);
do {
$number = $firstDigit.static::numerify('#########');
} while (!static::checkSum($number));
return $number;
$partialValue = static::numerify(
static::randomElement(array(1, 2)) . str_repeat('#', 8)
);
return Luhn::generateLuhnNumber($partialValue);
}
/**
* @example
* @example 1010101010
*/
public static function nationalIdNumber()
{
do {
$number = '1'.static::numerify('#########');
} while (!static::checkSum($number));
return $number;
$partialValue = static::numerify(1 . str_repeat('#', 8));
return Luhn::generateLuhnNumber($partialValue);
}
/**
* @example
* @example 2010101010
*/
public static function foreignerIdNumber()
{
do {
$number = '2'.static::numerify('#########');
} while (!static::checkSum($number));
return $number;
}
/**
* Check sum the number.
* @param $number
*
* @return bool
*/
protected static function checkSum($number)
{
$sum = 0;
$nums = str_split($number);
for ($i = 0; $i < 10; $i++) {
if ($i % 2 == 0) {
$s = $nums[$i] * 2;
$sum += $s % 10 + floor($s / 10);
} else {
$sum += $nums[$i];
}
}
return ($sum % 10 == 0);
$partialValue = static::numerify(2 . str_repeat('#', 8));
return Luhn::generateLuhnNumber($partialValue);
}
}

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Text.php vendored Executable file → Normal file
View file

13
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/at_AT/Payment.php vendored Executable file → Normal file
View file

@ -28,4 +28,17 @@ class Payment extends \Faker\Provider\Payment
return sprintf("%s%d", $prefix, self::randomNumber(8, true));
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'AT', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/Person.php vendored Executable file → Normal file
View file

View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/bn_BD/Person.php vendored Executable file → Normal file
View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/bn_BD/Utils.php vendored Executable file → Normal file
View file

View file

View file

View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Person.php vendored Executable file → Normal file
View file

View file

@ -5,10 +5,10 @@ namespace Faker\Provider\cs_CZ;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
'+420 ### ### ###',
'### ### ###',
'00420#########',
'+420#########',
'#########',
'+420 %## ### ###',
'%## ### ###',
'00420%########',
'+420%########',
'%########',
);
}

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Text.php vendored Executable file → Normal file
View file

View file

View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Person.php vendored Executable file → Normal file
View file

View file

View file

@ -4,7 +4,7 @@ namespace Faker\Provider\de_AT;
class Address extends \Faker\Provider\Address
{
protected static $buildingNumber = array('###', '##', '#');
protected static $buildingNumber = array('###', '##', '#', '##[abc]', '#[abc]');
protected static $streetSuffixLong = array(
'Gasse', 'Platz', 'Ring', 'Straße', 'Weg',
@ -108,4 +108,9 @@ class Address extends \Faker\Provider\Address
{
return static::randomElement(static::$state);
}
public static function buildingNumber()
{
return static::regexify(self::numerify(static::randomElement(static::$buildingNumber)));
}
}

View file

View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Person.php vendored Executable file → Normal file
View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_AT/Text.php vendored Executable file → Normal file
View file

View file

@ -4,7 +4,7 @@ namespace Faker\Provider\de_CH;
class Address extends \Faker\Provider\Address
{
protected static $buildingNumber = array('###', '##', '#', '#a', '#b', '#c');
protected static $buildingNumber = array('###', '##', '#', '##[abc]', '#[abc]');
protected static $streetSuffixLong = array(
'Gasse', 'Platz', 'Ring', 'Strasse', 'Weg', 'Allee'
@ -177,4 +177,9 @@ class Address extends \Faker\Provider\Address
$canton = static::canton();
return current($canton);
}
public static function buildingNumber()
{
return static::regexify(self::numerify(static::randomElement(static::$buildingNumber)));
}
}

View file

10
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php vendored Executable file → Normal file
View file

@ -4,6 +4,14 @@ namespace Faker\Provider\de_CH;
class Internet extends \Faker\Provider\Internet
{
protected static $freeEmailDomain = array('gmail.com', 'hotmail.com', 'yahoo.com', 'googlemail.com', 'gmx.ch', 'bluewin.ch', 'swissonline.ch');
protected static $freeEmailDomain = array(
'gmail.com',
'hotmail.com',
'yahoo.com',
'googlemail.com',
'gmx.ch',
'bluewin.ch',
'swissonline.ch'
);
protected static $tld = array('com', 'com', 'com', 'net', 'org', 'li', 'ch', 'ch');
}

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Person.php vendored Executable file → Normal file
View file

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Text.php vendored Executable file → Normal file
View file

39
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

View file

19
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php vendored Executable file → Normal file
View file

@ -4,6 +4,23 @@ namespace Faker\Provider\de_DE;
class Internet extends \Faker\Provider\Internet
{
protected static $freeEmailDomain = array('web.de', 'gmail.com', 'hotmail.de', 'yahoo.de', 'googlemail.com', 'aol.de', 'gmx.de');
/**
* @link https://www.statista.com/statistics/446418/most-popular-e-mail-providers-germany/
* @link http://blog.shuttlecloud.com/the-10-most-popular-email-providers-in-germany
*/
protected static $freeEmailDomain = array(
'web.de',
'gmail.com',
'hotmail.de',
'yahoo.de',
'googlemail.com',
'aol.de',
'gmx.de',
'freenet.de',
'posteo.de',
'mail.de',
'live.de',
't-online.de'
);
protected static $tld = array('com', 'com', 'com', 'net', 'org', 'de', 'de', 'de');
}

37
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Payment.php vendored Executable file → Normal file
View file

@ -16,4 +16,41 @@ class Payment extends \Faker\Provider\Payment
{
return static::iban($countryCode, $prefix, $length);
}
/**
* Sources:
* The 19 largest German banks by total assets
* @see https://de.wikipedia.org/wiki/Liste_der_größten_Banken_in_Deutschland
* The 20 largest co-operative banks by branch count
* @see https://de.wikipedia.org/wiki/Liste_der_Genossenschaftsbanken_in_Deutschland
* The 20 largest public savings banks by branch count
* @see https://de.wikipedia.org/wiki/Liste_der_Sparkassen_in_Deutschland
*/
protected static $banks = array(
'Bank 1 Saar', 'Bayerische Landesbank', 'BBBank', 'Berliner Sparkasse', 'Berliner Volksbank', 'Braunschweigische Landessparkasse',
'Commerzbank',
'DekaBank Deutsche Girozentrale', 'Deutsche Apotheker- und Ärztebank', 'Deutsche Bank', 'Deutsche Kreditbank', 'Deutsche Pfandbriefbank', 'Dortmunder Volksbank', 'DZ Bank',
'Erzgebirgssparkasse',
'Frankfurter Sparkasse', 'Frankfurter Volksbank',
'Hamburger Sparkasse', 'Hannoversche Volksbank', 'HSGV', 'HSH Nordbank',
'ING-DiBa',
'KfW', 'Kreissparkasse Esslingen-Nürtingen', 'Kreissparkasse Heilbronn', 'Kreissparkasse Köln', 'Kreissparkasse Ludwigsburg', 'Kreissparkasse München Starnberg Ebersberg',
'L-Bank', 'Landesbank Baden-Württemberg', 'Landesbank Hessen-Thüringen', 'Landessparkasse zu Oldenburg', 'Landwirtschaftliche Rentenbank',
'Mittelbrandenburgische Sparkasse in Potsdam',
'Nassauische Sparkasse', 'Norddeutsche Landesbank', 'NRW.Bank',
'Ostsächsische Sparkasse Dresden',
'Postbank',
'Sparkasse Hannover', 'Sparkasse KölnBonn', 'Sparkasse Mainfranken Würzburg', 'Sparkasse Nürnberg', 'Sparkasse Pforzheim Calw', 'Stadtsparkasse München',
'Unicredit Bank',
'Vereinigte Volksbank', 'Volksbank, Hildesheim-Lehrte-Pattensen', 'Volksbank Alzey-Worms', 'Volksbank Braunschweig Wolfsburg', 'Volksbank Darmstadt - Südhessen', 'Volksbank Hohenlohe', 'Volksbank Kraichgau Wiesloch-Sinsheim', 'Volksbank Lüneburger Heide', 'Volksbank Mittelhessen', 'Volksbank Paderborn-Höxter-Detmold', 'Volksbank Raiffeisenbank Rosenheim-Chiemsee', 'Volksbank Stuttgart', 'VR Bank Main-Kinzig-Büdingen',
'WGZ Bank',
);
/**
* @example 'Volksbank Stuttgart'
*/
public static function bank()
{
return static::randomElement(static::$banks);
}
}

2
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Person.php vendored Executable file → Normal file
View file

@ -38,7 +38,7 @@ class Person extends \Faker\Provider\Person
'Eberhard', 'Eckard', 'Eckart', 'Eckehard', 'Eckhard', 'Eckhardt', 'Edgar', 'Edmund', 'Eduard', 'Edward', 'Edwin', 'Egbert', 'Egon', 'Ehrenfried', 'Ekkehard', 'Elmar', 'Emanuel', 'Emil', 'Engelbert', 'Enno', 'Enrico', 'Erhard', 'Eric', 'Erich', 'Erik', 'Ernst', 'Ernst-August', 'Erwin', 'Eugen', 'Ewald',
'Fabian', 'Falk', 'Falko', 'Felix', 'Ferdinand', 'Florian', 'Francesco', 'Franco', 'Frank', 'Franz', 'Franz Josef', 'Franz-Josef', 'Fred', 'Fredi', 'Fridolin', 'Friedbert', 'Friedemann', 'Frieder', 'Friedhelm', 'Friedrich', 'Friedrich-Wilhelm', 'Fritz',
'Gabriel', 'Gebhard', 'Georg', 'Georgios', 'Gerald', 'Gerd', 'Gerhard', 'Gernot', 'Gero', 'Gerold', 'Gert', 'Gilbert', 'Giovanni', 'Gisbert', 'Giuseppe', 'Gottfried', 'Gotthard', 'Gottlieb', 'Gregor', 'Guenter', 'Guido', 'Guiseppe', 'Gunnar', 'Gunter', 'Gunther', 'Gustav', 'Götz', 'Günter', 'Günther',
'Hagen', 'Halil', 'Hannes', 'Hanni', 'Hanno', 'Hanns', 'Hans', 'Hans D.', 'Hans Dieter', 'Hans Georg', 'Hans Jürgen', 'Hans Peter', 'Hans-Christian', 'Hans-Dieter', 'Hans-Georg', 'Hans-Gerd', 'Hans-Günter', 'Hans-Günther', 'Hans-Heinrich', 'Hans-Hermann', 'Hans-J.', 'Hans-Joachim', 'Hans-Jochen', 'Hans-Josef', 'Hans-Jörg', 'Hans-Jürgen', 'Hans-Martin', 'Hans-Otto', 'Hans-Peter', 'Hans-Ulrich', 'Hans-Walter', 'Hans-Werner', 'Hans-Wilhelm', 'Hansjörg', 'Hanspeter', 'Harald', 'Hardy', 'Harri', 'Harro', 'Harry', 'Hartmut', 'Hartwig', 'Hasan', 'Heiko', 'Heiner', 'Heino', 'Heinrich', 'Heinz', 'Heinz-Dieter', 'Heinz-Georg', 'Heinz-Günter', 'Heinz-Joachim', 'Heinz-Josef', 'Heinz-Jürgen', 'Heinz-Peter', 'Heinz-Werner', 'Helfried', 'Helge', 'Hellmut', 'Hellmuth', 'Helmar', 'Helmut', 'Helmuth', 'Hendrik', 'Henning', 'Henrik', 'Henry', 'Henryk', 'Herbert', 'Heribert', 'Hermann', 'Hermann-Josef', 'Herwig', 'Hilmar', 'Hinrich', 'Holger', 'Horst', 'Horst-Dieter', 'Hubert', 'Hubertus', 'Hugo', 'Hüseyin',
'Hagen', 'Halil', 'Hannes', 'Hanni', 'Hanno', 'Hanns', 'Hans', 'Hans Dieter', 'Hans Georg', 'Hans Jürgen', 'Hans Peter', 'Hans-Christian', 'Hans-Dieter', 'Hans-Georg', 'Hans-Gerd', 'Hans-Günter', 'Hans-Günther', 'Hans-Heinrich', 'Hans-Hermann', 'Hans-J.', 'Hans-Joachim', 'Hans-Jochen', 'Hans-Josef', 'Hans-Jörg', 'Hans-Jürgen', 'Hans-Martin', 'Hans-Otto', 'Hans-Peter', 'Hans-Ulrich', 'Hans-Walter', 'Hans-Werner', 'Hans-Wilhelm', 'Hansjörg', 'Hanspeter', 'Harald', 'Hardy', 'Harri', 'Harro', 'Harry', 'Hartmut', 'Hartwig', 'Hasan', 'Heiko', 'Heiner', 'Heino', 'Heinrich', 'Heinz', 'Heinz-Dieter', 'Heinz-Georg', 'Heinz-Günter', 'Heinz-Joachim', 'Heinz-Josef', 'Heinz-Jürgen', 'Heinz-Peter', 'Heinz-Werner', 'Helfried', 'Helge', 'Hellmut', 'Hellmuth', 'Helmar', 'Helmut', 'Helmuth', 'Hendrik', 'Henning', 'Henrik', 'Henry', 'Henryk', 'Herbert', 'Heribert', 'Hermann', 'Hermann-Josef', 'Herwig', 'Hilmar', 'Hinrich', 'Holger', 'Horst', 'Horst-Dieter', 'Hubert', 'Hubertus', 'Hugo', 'Hüseyin',
'Ibrahim', 'Ignaz', 'Igor', 'Ingo', 'Ingolf', 'Ismail', 'Ivan', 'Ivo',
'Jakob', 'Jan', 'Janusz', 'Jens', 'Jens-Uwe', 'Joachim', 'Jochen', 'Johann', 'Johannes', 'John', 'Jonas', 'Jonas', 'Jose', 'Josef', 'Joseph', 'Josip', 'Jost', 'Juergen', 'Julian', 'Julius', 'Juri', 'Jörg', 'Jörn', 'Jürgen',
'Kai-Uwe', 'Karl', 'Karl Heinz', 'Karl-Ernst', 'Karl-Friedrich', 'Karl-Heinrich', 'Karl-Heinz', 'Karl-Josef', 'Karl-Ludwig', 'Karl-Otto', 'Karl-Wilhelm', 'Karlheinz', 'Karsten', 'Kaspar', 'Kevin', 'Klaus', 'Klaus Dieter', 'Klaus Peter', 'Klaus-Dieter', 'Klaus-Jürgen', 'Klaus-Peter', 'Klemens', 'Knut', 'Konrad', 'Konstantin', 'Konstantinos', 'Kuno', 'Kurt',

View file

0
pfosten/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Text.php vendored Executable file → Normal file
View file

View file

View file

@ -42,7 +42,7 @@ class Company extends \Faker\Provider\Company
);
protected static $οbject = array(
protected static $object = array(
'Προγραμματιστής',
'Δικηγόρος',
'Γιατρός',
@ -79,6 +79,6 @@ class Company extends \Faker\Provider\Company
*/
public static function object()
{
return static::randomElement(static::$οbject);
return static::randomElement(static::$object);
}
}

Some files were not shown because too many files have changed in this diff Show more