Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #788 from mhamlet/master
Browse files Browse the repository at this point in the history
Added some fixes to Armenian locale
  • Loading branch information
fzaninotto committed Apr 29, 2016
2 parents 55688c8 + 4259ace commit 2ad583f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 28 deletions.
12 changes: 12 additions & 0 deletions src/Faker/Provider/hy_AM/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Faker\Provider\hy_AM;

class Color extends \Faker\Provider\Color
{
protected static $safeColorNames = array(
'սև', 'դեղին', 'սպիտակ', 'մոխրագույն', 'կարմիր',
'կապույտ', 'երկնագույն', 'կանաչ', 'կապտականաչ',
'մանուշակագույն', 'շագանակագույն',
);
}
1 change: 1 addition & 0 deletions src/Faker/Provider/hy_AM/Internet.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

class Internet extends \Faker\Provider\Internet
{
protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'yandex.ru', 'mail.ru', 'mail.am');
protected static $tld = array('com', 'com', 'am', 'am', 'am', 'net', 'org', 'ru', 'am', 'am', 'am');
}
59 changes: 31 additions & 28 deletions src/Faker/Provider/hy_AM/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,37 @@

class PhoneNumber extends \Faker\Provider\PhoneNumber
{

protected static $codes = array(91, 96, 99, 43, 77, 93, 94, 98, 97, 77, 55, 95, 41, 49);

protected static $numberFormats = array(
'######',
'##-##-##',
'###-###',
);

protected static $formats = array(
'093 ######',
'093 ##-##-##',
'(093) ######',
'(093) ##-##-##',
'094 ######',
'094 ##-##-##',
'(094) ######',
'(094) ##-##-##',
'095 ######',
'095 ##-##-##',
'(095) ######',
'(095) ##-##-##',
'096 ######',
'096 ##-##-##',
'(096) ######',
'(096) ##-##-##',
'099 ######',
'099 ##-##-##',
'(099) ######',
'(099) ##-##-##',
'077 ######',
'077 ##-##-##',
'(077) ######',
'(077) ##-##-##',
'055 ######',
'055 ##-##-##',
'(055) ######',
'(055) ##-##-##',
'0{{code}} {{numberFormat}}',
'(0{{code}}) {{numberFormat}}',
'+374{{code}} {{numberFormat}}',
'+374 {{code}} {{numberFormat}}',
);

public function phoneNumber()
{
return static::numerify($this->generator->parse(static::randomElement(static::$formats)));
}

public function code()
{
return static::randomElement(static::$codes);
}

/**
* @return mixed
*/
public function numberFormat()
{
return static::randomElement(static::$numberFormats);
}
}

0 comments on commit 2ad583f

Please sign in to comment.