Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -56,7 +56,8 @@ class Iban extends AbstractValidator
protected static $sepaCountries = [
'AT', 'BE', 'BG', 'CY', 'CZ', 'DK', 'FO', 'GL', 'EE', 'FI', 'FR', 'DE',
'GI', 'GR', 'HU', 'IS', 'IE', 'IT', 'LV', 'LI', 'LT', 'LU', 'MT', 'MC',
'NL', 'NO', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'CH', 'GB'
'NL', 'NO', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'CH', 'GB', 'SM',
'HR',
];
/**
@@ -75,6 +76,7 @@ class Iban extends AbstractValidator
'BG' => 'BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}',
'BH' => 'BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}',
'BR' => 'BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]',
'BY' => 'BY[0-9]{2}[A-Z0-9]{4}[0-9]{4}[A-Z0-9]{16}',
'CH' => 'CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}',
'CR' => 'CR[0-9]{2}[0-9]{3}[0-9]{14}',
'CY' => 'CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}',
@@ -175,7 +177,7 @@ class Iban extends AbstractValidator
if ($countryCode !== null) {
$countryCode = (string) $countryCode;
if (!isset(static::$ibanRegex[$countryCode])) {
if (! isset(static::$ibanRegex[$countryCode])) {
throw new Exception\InvalidArgumentException(
"Country code '{$countryCode}' invalid by ISO 3166-1 or not supported"
);
@@ -216,7 +218,7 @@ class Iban extends AbstractValidator
*/
public function isValid($value)
{
if (!is_string($value)) {
if (! is_string($value)) {
$this->error(self::FALSEFORMAT);
return false;
}
@@ -229,19 +231,19 @@ class Iban extends AbstractValidator
$countryCode = substr($value, 0, 2);
}
if (!array_key_exists($countryCode, static::$ibanRegex)) {
if (! array_key_exists($countryCode, static::$ibanRegex)) {
$this->setValue($countryCode);
$this->error(self::NOTSUPPORTED);
return false;
}
if (!$this->allowNonSepa && !in_array($countryCode, static::$sepaCountries)) {
if (! $this->allowNonSepa && ! in_array($countryCode, static::$sepaCountries)) {
$this->setValue($countryCode);
$this->error(self::SEPANOTSUPPORTED);
return false;
}
if (!preg_match('/^' . static::$ibanRegex[$countryCode] . '$/', $value)) {
if (! preg_match('/^' . static::$ibanRegex[$countryCode] . '$/', $value)) {
$this->error(self::FALSEFORMAT);
return false;
}