Get card type

If no "card type" value has been set, this method will
set and return a default "card type" value,
if any such value is available

@see getDefaultCardType()

@return string|null card type or null if no card type has been set
19009
public function getCardType() : ?string 
    {
        if ( ! $this->hasCardType()) {
            $this->setCardType($this->getDefaultCardType());
        }
        return $this->cardType;
    }
1199335
public function getCardType()
    {
        $number = str_replace(
            [' ', '-'],
            '',
            $this->number
        );

        foreach (static::$cardTypes as $type => $regex) {
            if (1 === preg_match($regex, $this->number)) {
                return $type;
            }
        }

        return 'Unknown';
    }
1295229
public function getDefaultIdentifier()
    {
        if ($defaultIdentifiers = $this->config()->default_identifiers) {
            
            if (isset($defaultIdentifiers[$this->getClass()])) {
                return $defaultIdentifiers[$this->getClass()];
            }
            
        }
    }
142748
public function getPhpType()
    {
        if (isset(self::$_phpTypesByProtobufType[$this->getType()])) {
            return self::$_phpTypesByProtobufType[$this->getType()];
        } else {
            return null;
        }
    }
803446
public function getDefault()
    {
        $category = $this->getCategory();

        $categoryConfig = $this->getCategoryConfig($category);

        if (!isset($categoryConfig[ModelInterface::DEFAULT_CONTEXT])) {
            throw new DefaultMissingException(
                'ConfigModel requires default to be set'
            );
        }

        return $categoryConfig[ModelInterface::DEFAULT_CONTEXT];
    }
1227258
protected function findType()
    {
        foreach ($this->envNames as $envName) {
            if (isset($_SERVER[$envName])) {
                return $_SERVER[$envName];
            }
        }

        $cfgEnv = get_cfg_var($this->iniName);
        if ($cfgEnv !== false) {
            return $cfgEnv;
        }

        return static::$DEFAULT_TYPE;
    }
60295
public function getType()
    {
        $userType = get_user_meta($this->ID, self::KEY_TYPE, true);
        return ($userType) ? $userType : self::TYPE_DEFAULT;
    }
561479
public function getCardReference()
    {
        if (isset($this->data['object']) && 'customer' === $this->data['object']) {
            if (isset($this->data['default_source']) && !empty($this->data['default_source'])) {
                return $this->data['default_source'];
            }

            if (isset($this->data['default_card']) && !empty($this->data['default_card'])) {
                return $this->data['default_card'];
            }
            
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'card' === $this->data['object']) {
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            if (! empty($this->data['source'])) {
                if (! empty($this->data['source']['id'])) {
                    return $this->data['source']['id'];
                }
            }
        }

        return null;
    }
263200
public function getInitialValue()
    {
        if ($this->hasDefaultValue) {
            return $this->defaultValue;
        }

        return $this->isNullable ? null : $this->dataType->getInitialValue();
    }
1231994
public function getDefaultItemType()
    {
        if ($this->hasOption(self::OPTION_DEFAULT_ITEM_TYPE)) {
            return $this->getOption(self::OPTION_DEFAULT_ITEM_TYPE);
        }
        return false;
    }
1007094
public static function getDefault()
    {
        if (static::$_default != null) {
            return static::$_default;
        }

        // check if running into laravel context
        if (Context::checkLaravel()) {
            static::$_default = new self(['socket' => 'Laravel']);

            return static::$_default;
        }

        // check if registered container
        if (Context::checkContainer()) {
            return Context::getContainerDatabase();
        }
    }
434742
public function getCardNumber() : ?string 
    {
        if ( ! $this->hasCardNumber()) {
            $this->setCardNumber($this->getDefaultCardNumber());
        }
        return $this->cardNumber;
    }
629300
public static function get_default() {
        if ($visiblechildren = self::top()->get_children()) {
            $defcategory = reset($visiblechildren);
        } else {
            $toplevelcategories = self::get_tree(0);
            $defcategoryid = $toplevelcategories[0];
            $defcategory = self::get($defcategoryid, MUST_EXIST, true);
        }
        return $defcategory;
    }
360379
protected function getDefaultSerial()
    {
        if ($this->getServiceConfig()->getShopEdition() != 'CE') {
            $core = new Core();
            /** @var \OxidEsales\EshopProfessional\Setup\Setup|\OxidEsales\EshopEnterprise\Setup\Setup $setup */
            $setup = $core->getInstance('Setup');
            return $setup->getDefaultSerial();
        }

        return null;
    }
120254
public function getAvailableCardTypes() {
        $ccTypes = $this->getValue(
            self::KEY_CC_TYPES,
            $this->storeManager->getStore()
        );

        return ! empty($ccTypes) ? explode(',', $ccTypes) : [];
    }
986122
public String getDefaultValue() {

        String value = null;
        if (!m_defaultValues.isEmpty()) {
            value = m_defaultValues.get(m_defaultValues.size() - 1);
        }
        return value;
    }
774578
public function defaultChild()
    {
        $default = $this->config()->get('default_child');
        $allowed = $this->allowedChildren();
        if ($allowed) {
            if (!$default || !in_array($default, $allowed)) {
                $default = reset($allowed);
            }
            return $default;
        }
        return null;
    }