Address.php
5 years ago
Company.php
5 years ago
Internet.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
Company.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\en_ZA; |
| 4 | |
| 5 | /** |
| 6 | * Class Company. |
| 7 | */ |
| 8 | class Company extends \Faker\Provider\Company |
| 9 | { |
| 10 | protected static $legalEntities = array( |
| 11 | '01', '02', '06', '07', '08', '09', '10', '11', '12', '14', '15', '16', '17', '20', '21', '22', '23', '24', '25', |
| 12 | '26', '30', '31', '80', |
| 13 | ); |
| 14 | |
| 15 | /** |
| 16 | * Return a valid company registration number. |
| 17 | * |
| 18 | * @return string |
| 19 | */ |
| 20 | public function companyNumber() |
| 21 | { |
| 22 | return sprintf( |
| 23 | '%s/%s/%s', |
| 24 | \Faker\Provider\DateTime::dateTimeBetween('-50 years', 'now')->format('Y'), |
| 25 | static::randomNumber(6, true), |
| 26 | static::randomElement(static::$legalEntities) |
| 27 | ); |
| 28 | } |
| 29 | } |
| 30 |