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

Commit

Permalink
Fix coding standards (using php-cs-fixer)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Dec 16, 2013
1 parent 3fb1622 commit 51a210e
Show file tree
Hide file tree
Showing 24 changed files with 714 additions and 714 deletions.
18 changes: 9 additions & 9 deletions src/Faker/Provider/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ public function creditCardDetails($valid = true)
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param string $prefix for generating bank account number of a specific bank
* @param integer $length total length without country code and 2 check digits
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param string $prefix for generating bank account number of a specific bank
* @param integer $length total length without country code and 2 check digits
* @return string
*/
protected static function iban($countryCode, $prefix = '', $length = null)
Expand All @@ -212,7 +212,7 @@ protected static function iban($countryCode, $prefix = '', $length = null)
$length = 24;
} else {
$length = 0;
foreach($format as $part) {
foreach ($format as $part) {
list($class, $groupCount) = $part;
$length += $groupCount;
}
Expand All @@ -234,7 +234,7 @@ protected static function iban($countryCode, $prefix = '', $length = null)
$nextPart = array_shift($format);
list($class, $groupCount) = $nextPart;
}
switch($class) {
switch ($class) {
default:
case 'c': $result .= mt_rand(0, 100) <= 50 ? static::randomDigit() : strtoupper(static::randomLetter()); break;
case 'a': $result .= strtoupper(static::randomLetter()); break;
Expand All @@ -247,9 +247,9 @@ protected static function iban($countryCode, $prefix = '', $length = null)
$countryNumber = 100 * (ord($countryCode[0])-55) + (ord($countryCode[1])-55);
$tempResult = $result . $countryNumber . '00';
// perform MOD97-10 checksum calculation
$checksum = (int)$tempResult[0];
$checksum = (int) $tempResult[0];
for ($i = 1, $size = strlen($tempResult); $i < $size; $i++) {
$checksum = (10 * $checksum + (int)$tempResult[$i]) % 97;
$checksum = (10 * $checksum + (int) $tempResult[$i]) % 97;
}
$checksum = 98 - $checksum;
if ($checksum < 10)
Expand All @@ -260,8 +260,8 @@ protected static function iban($countryCode, $prefix = '', $length = null)

/**
* Calculates a checksum for the national bank and branch code part in the IBAN.
* @param string $iban randomly generated $iban
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param string $iban randomly generated $iban
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @return string IBAN with one character altered to a proper checksum
*/
protected static function addBankCodeChecksum($iban, $countryCode = '')
Expand Down
24 changes: 12 additions & 12 deletions src/Faker/Provider/bg_BG/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'BG', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'BG', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
24 changes: 12 additions & 12 deletions src/Faker/Provider/cs_CZ/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'CZ', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'CZ', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
25 changes: 12 additions & 13 deletions src/Faker/Provider/da_DK/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'DK', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'DK', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}

24 changes: 12 additions & 12 deletions src/Faker/Provider/de_AT/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'AT', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'AT', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
24 changes: 12 additions & 12 deletions src/Faker/Provider/de_DE/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'DE', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'DE', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
24 changes: 12 additions & 12 deletions src/Faker/Provider/el_GR/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'GR', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'GR', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
24 changes: 12 additions & 12 deletions src/Faker/Provider/en_GB/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

class Payment extends \Faker\Provider\Payment
{
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'GB', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* International Bank Account Number (IBAN)
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param integer $length total length without country code and 2 check digits
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'GB', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
}
Loading

0 comments on commit 51a210e

Please sign in to comment.