diff --git a/readme.md b/readme.md index e124533a48..062b329f2f 100644 --- a/readme.md +++ b/readme.md @@ -720,6 +720,16 @@ Fugiat non in itaque sunt nobis totam. Sed nesciunt est deleniti cumque alias. R ## Language specific formatters +### `Faker\Provider\ar_SA\Person` +```php +idNumber; // ID number +echo $faker->nationalIdNumber // Citizen ID number +echo $faker->foreignerIdNumber // Foreigner ID number + +``` + ### `Faker\Provider\at_AT\Payment` ```php 5) { - throw new \InvalidArgumentException('indexSize must be at most 5'); - } - - $words = $this->getConsecutiveWords($indexSize); - $result = array(); - $resultLength = 0; - // take a random starting point - $next = static::randomKey($words); - while ($resultLength < $maxNbChars && isset($words[$next])) { - // fetch a random word to append - $word = static::randomElement($words[$next]); - - // calculate next index - $currentWords = explode(' ', $next); - - $currentWords[] = $word; - array_shift($currentWords); - $next = implode(' ', $currentWords); - - if ($resultLength == 0 && !preg_match('/^\p{Arabic}/u', $word)) { - continue; - } - // append the element - $result[] = $word; - $resultLength += strlen($word) + 1; - } - - // remove the element that caused the text to overflow - array_pop($result); - - // build result - $result = implode(' ', $result); - - return $result.'.'; + return preg_match('/^\p{Arabic}/u', $word); } /** diff --git a/src/Faker/Provider/ar_SA/Address.php b/src/Faker/Provider/ar_SA/Address.php new file mode 100644 index 0000000000..408ab901ee --- /dev/null +++ b/src/Faker/Provider/ar_SA/Address.php @@ -0,0 +1,146 @@ +generator->parse($format)); + } + + /** + * @example 'wewebit.jo' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} diff --git a/src/Faker/Provider/ar_SA/Person.php b/src/Faker/Provider/ar_SA/Person.php new file mode 100644 index 0000000000..ed1d0d2ee5 --- /dev/null +++ b/src/Faker/Provider/ar_SA/Person.php @@ -0,0 +1,148 @@ +