Check whether this is a valid (known) transaction type

@param string $type

@return bool
971230
public static function isPayByVoucher($type)
    {
        $transactionTypesList = [
            self::PAYBYVOUCHER_YEEPAY,
            self::PAYBYVOUCHER_SALE
        ];

        return in_array(strtolower($type), $transactionTypesList);
    }
279911
public static function validateType($type)
    {
        if (!in_array($type, [self::TYPE_INFO, self::TYPE_SUCCESS, self::TYPE_WARNING, self::TYPE_ERROR])) {
            throw new \InvalidArgumentException('Invalid resource message type "%s".', $type);
        }
    }
219919
public static function isString($type): bool
    {
        return (
            \is_int($type) &&
            $type >= self::TYPE_STRING &&
            $type <= self::TYPE_VARCHAR
        );
    }
1163926
protected function isValid($type, $data)
    {
        $valid = Validation::i();

        switch ($type) {
            case 'location':
                return $valid->isLocation($data);
            case 'utc':
                return $valid->isUtc($data);
            case 'abbr':
                return $valid->isAbbr($data);
            default:
                break;
        }

        return parent::isValid($type, $data);
    }
827652
public static function isAllowed($type){
        return (!empty($type) && (in_array($type, self::$allowedTypes))) || self::isAssessmentItem($type) || self::isAssessmentTest($type);
    }
108272
protected function checkType($type)
    {
        // If no types to check are defined return true
        if (empty($this->types)) {
            return true;
        }

        // Check input type
        $expression = implode('|', $this->types);
        $valid = preg_match('/^(' . $expression . ')$/', $type);

        return $valid === 1;
    }
395982
protected function validateTypeCache($type, $files)
    {
        // If the files isn't cached we have to cache the file
        $hash = $this->getTypeHash($type);
        if (!isset($this->cachedFiles[$hash])) {
            return false;
        } 
        
        $data = $this->cachedFiles[$hash];
        $checksums = $data['checksums'];

        // Are all files existing?
        foreach ($files as $file) {
            if (!file_exists($file->getFileName())) {
                return false;
            }
            
            $fileHash = $this->getHash($file->getFileName());
            $contentHash = md5_file($file->getFileName());
            if (!isset($checksums[$fileHash]) || $contentHash !== $checksums[$fileHash]) {
                return false;
            }
        }
        
        return true;
    }
162972
public function isDonateAlreadyAdded($transactionId, $type)
    {
        if (!$transactionId) {
            return false;
        }

        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->where('p.transactionId = :transactionId')
            ->setParameter('transactionId', $transactionId)
            ->andWhere('p.type = :type')
            ->setParameter('type', $type)
            ->andWhere('p.success = :success')
            ->setParameter('success', Entity::STATUS_SUCCESS)
            ->setMaxResults(1)
            ->getQuery();

        return (bool)$query->getOneOrNullResult($query::HYDRATE_SIMPLEOBJECT);
    }
961338
public static function isValidType($type)
    {
        if ($type === '') {
            $result = true;
        } else {
            $valid = self::getTypesInfo();
            $result = isset($valid[$type]);
        }

        return $result;
    }
846013
public function isSingleton($type): bool
    {
        assert(isset($this->types[$type]));
        return $this->types[$type];
    }
901103
public function isCorrectType($type, $path)
	{
		if ( ! $type)
		{
			return true;
		}

		if ( ! isset($this->typeCache[$path]))
		{
			$this->typeCache[$path] = is_file($path) ? 'file' : 'dir';
		}

		return $this->typeCache[$path] === $type;
	}
1083972
private function hasHandlers(string $type): bool
    {
        return isset($this->handlers[$type]) && count($this->handlers[$type]) > 0;
    }
793716
protected function supportedType($type)
    {
        $supportedType = false;

        $baseType = substr($type, 0, strpos($type, '-'));

        if (array_key_exists($baseType, $this->supportedTypes)) {
            $supportedType = $baseType;
        }

        return $supportedType;
    }
730591
public static function isFlowPackageType(string $packageType): bool
    {
        foreach (['typo3-flow-', 'neos-'] as $allowedPackageTypePrefix) {
            if (strpos($packageType, $allowedPackageTypePrefix) === 0) {
                return true;
            }
        }

        return false;
    }
1017098
public function contains($type)
	{
		foreach($this->tokens as $token)
		{
			if($token->is($type))
			{
				return true;
			}
		}
		
		return false;
	}
275009
public function hasMessages($type)
    {
        return isset($_SESSION[$alias = $this->alias][$type]) && count($_SESSION[$alias][$type]) > 0;
    }
826207
protected function resolveType($type)
    {
        $types = $this->billTypes;

        // Type is a normal key
        if (isset($types[$type])) {
            return $type;
        }

        // Type is a title of type instead of its key
        if (in_array($type, $types, true)) {
            return array_search($type, $types, true);
        }

        // Assuming only second part is passed. Match from the end
        $foundKey = null;
        foreach ($types as $key => $title) {
            list(, $name) = explode(',', $key);
            if ($name === $type) {
                if ($foundKey !== null) {
                    throw new InvalidValueException('Payment type "' . $type . '" is ambiguous');
                }

                $foundKey = $key;
            }
        }

        if ($foundKey) {
            return $foundKey;
        }

        throw new InvalidValueException('Payment type "' . $type . '" is not recognized');
    }