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

Added some fixes to Armenian locale #788

Merged
merged 3 commits into from
Apr 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}