for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Respect\Validation\Rules\Locale;
use Respect\Validation\Exceptions\ComponentException;
use Respect\Validation\Validatable;
class Factory
{
/**
* @return Validatable
*/
public function bic($countryCode)
$filteredCountryCode = strtoupper($countryCode);
switch ($filteredCountryCode) {
case 'DE':
return new GermanBic();
default:
throw new ComponentException(
sprintf(
'Cannot provide BIC validation for country "%s"',
$countryCode
)
);
}
public function bank($countryCode)
return new GermanBank();
'Cannot provide bank validation for country "%s"',
public function bankAccount($countryCode, $bank)
return new GermanBankAccount($bank);
'Cannot provide bank account validation for country "%s" and bank "%s"',
$countryCode,
$bank