Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker\Provider\fr_BE;
4
 
5
class Payment extends \Faker\Provider\Payment
6
{
7
    /**
8
     * International Bank Account Number (IBAN)
9
     *
10
     * @see http://en.wikipedia.org/wiki/International_Bank_Account_Number
11
     *
12
     * @param string $prefix      for generating bank account number of a specific bank
13
     * @param string $countryCode ISO 3166-1 alpha-2 country code
14
     * @param int    $length      total length without country code and 2 check digits
15
     *
16
     * @return string
17
     */
18
    public static function bankAccountNumber($prefix = '', $countryCode = 'BE', $length = null)
19
    {
20
        return static::iban($countryCode, $prefix, $length);
21
    }
22
 
23
    /**
24
     * Value Added Tax (VAT)
25
     *
26
     * @example 'BE0123456789', ('spaced') 'BE 0123456789'
27
     *
28
     * @see http://ec.europa.eu/taxation_customs/vies/faq.html?locale=en#item_11
29
     * @see http://www.iecomputersystems.com/ordering/eu_vat_numbers.htm
30
     * @see http://en.wikipedia.org/wiki/VAT_identification_number
31
     *
32
     * @param bool $spacedNationalPrefix
33
     *
34
     * @return string VAT Number
35
     */
36
    public static function vat($spacedNationalPrefix = true)
37
    {
38
        $prefix = $spacedNationalPrefix ? 'BE ' : 'BE';
39
 
40
        return sprintf('%s0%d', $prefix, self::randomNumber(9, true));
41
    }
42
}