@param string $type
@param string $subtype

@return int|array
427275
private function getExpiring($type, $subtype)
    {
        if (!isset($this->expiring[$type][$subtype])) {
            throw new \InvalidArgumentException("Invalid type or parameter given.");
        }

        return $this->expiring[$type][$subtype];
    }
108894
public function addType(Type $type)
    {
        if ($type instanceof self) {
            foreach ($type->getTypes() as $subType) {
                $this->types[] = $subType;
            }

            return $this;
        }

        $this->types[] = $type;

        return $this;
    }
572565
private function resolveTypes($type)
    {
        $columnTypes = [];

        do {
            $columnTypes[] = $columnType = $this->columnRegistry[$type];
        } while (($type = $columnType->getParent()) !== null);

        return $columnTypes;
    }
1129
public function get_subdef($subdef_type, $subdef_name)
    {
        $type = strtolower($subdef_type);
        $name = strtolower($subdef_name);

        $group = $this->getSubdefGroup(strtolower($subdef_type));

        if (!$group) {
            throw new Exception_Databox_SubdefNotFound(sprintf('Databox subdef name `%s` of type `%s` not found', $name, $type));
        }

        try {
            return $group->getSubdef($name);
        } catch (RuntimeException $exception) {
            throw new Exception_Databox_SubdefNotFound(sprintf('Databox subdef name `%s` of type `%s` not found', $name, $type), $exception);
        }
    }
750087
private function getSubClasses($subClasses)
    {
        $result = [];

        foreach ($subClasses as $subClass) {
            $children = $subClass->getSubClasses(false);
            $entry = [
                'uri' => $subClass->getUri(),
                'label' => $subClass->getLabel()
            ];
            if (count($children) > 0) {
                $entry['children'] = $this->getSubClasses($children);
            }
            array_push($result, $entry);
        }

        return $result;
    }
901001
public function get_display_value($value, $subtype = false) {
        $diff = static::get_max_value() - static::get_min_value();
        return round(100 * ($value - static::get_min_value()) / $diff) . '%';
    }
618612
public function generate_items_for_subtypes( $subtypes ) {
		$all_items = array();

		foreach ( $subtypes as $subtype ) {
			$locator = Carbon_Breadcrumb_Locator::factory( $this->get_type(), $subtype );
			if ( $locator->is_included() ) {
				$items     = $locator->get_items();
				$all_items = array_merge( $all_items, $items );
			}
		}

		return $all_items;
	}
1183213
protected function is_valid_assignment_subplugin($type) {
        static $subplugins = null;

        if (is_null($subplugins)) {
            $subplugins = get_plugin_list('assignment');
        }
        return array_key_exists($type, $subplugins);
    }
1014192
public function getSubTypeField($fieldName, $subType, $key)
    {

        if (!isset($this->fields[$fieldName][$subType][$key])) {
            return null;
        }

        return $this->fields[$fieldName][$subType][$key];
    }
1175306
public void addSubtype(String subtype) {
    if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
      subtypes.add(subtype.trim());
    }
  }
253968
protected function calculateSimpleType($type) {
    $pos = strrpos($type, '.');
    if ($pos !== false) {
      return substr($type, $pos+1);
    }
    return $type;
  }
1176317
public function visitOrType(OrType $type)
    {
        $subTypes = array();

        foreach ($type->types() as $subType) {
            $subTypes[] = $subType->accept($this);
        }

        return implode('|', $subTypes);
    }
987734
private static function validLogLevel($type, $sub_type) {
    switch (self::$log_level) {
      default:
      case self::LOG_NONE:
        return FALSE;
      case self::LOG_ALL:
        return TRUE; // Log everything
      case self::LOG_ACTIONS:
        if (self::isAction($type, $sub_type)) {
          return TRUE; // Log actions
        }
        return FALSE;
    }
  }
1244319
public <T> Stringifier<T> getStringifier(Class<? extends T> type, String subType) {
		return compositeStringifier.getForType(type, subType);
	}
399846
protected function getTypeRegexp($type)
    {
        if (!isset($this->types[$type])) {
            throw new OutOfBoundsException($this->translate(
                'Unknown selected type "{type}" param.',
                ['type' => $type]
            ));
        }

        return $this->types[$type];
    }
183681
public function forType(string $type): HandlerInterface
    {
        $traversable = null;
        $subtype = null;

        if (strpos($type, '|') !== false && substr($type, -2) === '[]') {
            list($traversable, $type) = explode('|', $type, 2);
            $subtype = substr($type, 0, -2);
        } elseif (substr($type, -2) === '[]') {
            $subtype = substr($type, 0, -2);
        } elseif (is_a($type, Traversable::class, true)) {
            $traversable = $type;
        } elseif ($type !== 'array') {
            throw new LogicException("Unable to use " . get_class($this) . " to cast to $type");
        }

        if ($traversable === $this->traversable && $subtype === $this->subtype) {
            return $this;
        }

        $handler = clone $this;
        $handler->traversable = $traversable;
        $handler->subtype = $subtype;

        return $handler;
    }
206873
public function fetchAll($type = parent::FETCH_TYPE_NUM)
    {
        return array_map($this->_callback, $this->_statement->fetchAll($type));
    }