public function __construct($brand = null)
{
if (null !== $brand && !isset($this->brands[$brand])) {
$brands = implode(', ', array_keys($this->brands));
$message = sprintf('"%s" is not a valid credit card brand (Available: %s).', $brand, $brands);
throw new ComponentException($message);
}
$this->brand = $brand;
}