@param string $priority

@return string
513355
public function prettyPrintPriority($priority)
    {
        $map = [
            MessagePriority::VERY_LOW => 'very low',
            MessagePriority::LOW => 'low',
            MessagePriority::NORMAL => 'normal',
            MessagePriority::HIGH => 'high',
            MessagePriority::VERY_HIGH => 'very high',
        ];

        return isset($map[$priority]) ? $map[$priority] : $priority;
    }
1208134
public function hasParser($className, $priority)
    {
        if (empty($this->parsers[$priority])) {
            return false;
        }

        return $this->parsers[$priority] === $className;
    }
506142
public static String getImage(Priority priority) {
        String image = getLabel("icon", priority);
        return image == null ? null : IconUtil.getIconPath(image);
    }
324943
public function write($priority, $message) {
		$config = $this->_config + $this->_classes;

		return function($params) use ($config) {
			$params += ['timestamp' => strtotime('now')];
			$key = $config['key'];
			$key = is_callable($key) ? $key($params) : Text::insert($key, $params);

			$cache = $config['cache'];
			return $cache::write($config['config'], $key, $params['message'], $config['expiry']);
		};
	}
1153027
protected function _retrieveLast4DigitsFromReason($reason)
    {
        $result = "";

        if ($reason != "") {
            $reasonArray = explode(":", $reason);
            if ($reasonArray != null && is_array($reasonArray)) {
                if (isset($reasonArray[1])) {
                    $result = $reasonArray[1];
                }
            }
        }

        return $result;
    }
133206
protected function parseCondition(string $condition): string
    {
        $conditions = $this->getConditions();

        foreach ($conditions as $signature => $conds) {
            $conds = is_array($conds) ? $conds : [$conds];

            if (in_array($condition, $conds, true)) {
                return $signature;
            }
        }

        return '';
    }
836050
public function priorityLabel($todo)
    {
        switch (true) {
            case $todo->priority > 1:
                $label = 'highest';
                break;
            case $todo->priority == 1:
                $label = 'high';
                break;
            case $todo->priority == -1:
                $label = 'low';
                break;
            case $todo->priority < -1:
                $label = 'lowest';
                break;
            default:
                $label = 'normal';
                break;
        }

        return $label;
    }
449687
public function do_length($topic, $priority = null)
    {
        /** @var \ManaPHP\DbInterface $db */
        $db = $this->_di->getShared($this->_db);

        if ($priority === null) {
            return $db->query($this->_source)->where(['topic' => $topic, 'deleted_time' => 0])->count();
        } else {
            return $db->query($this->_source)->where(['topic' => $topic, 'deleted_time' => 0, 'priority' => $priority])->count();
        }
    }
1369363
public function asString(): string
    {
        $parts = [];
        foreach ($this->acceptables as $acceptable => $priority) {
            if (1.0 === $priority) {
                $parts[] = $acceptable;
            } else {
                $parts[] = $acceptable . ';q=' . $priority;
            }
        }

        return join(',', $parts);
    }
361840
function getPriority()
    {
        $attributes = $this->parser->attributes($this->element);

        if (array_key_exists('priority', $attributes)) {
            return intval($attributes['priority']);
        }

        return null;
    }
1150063
public function setPriority($priority)
    {
        if (! (is_float($priority) && $priority >= 0 && $priority <= 1)) {
            throw new Exception('Priority must be >=0.0 and <=1.0');
        }

        $this->priority = number_format($priority, 1);

        return $this;
    }
438905
public function sort(array $changes, ?string $priority): array
    {
        // pur newer versions to the top, and "Unreleased" first
        usort($changes, function (Change $firstChange, Change $secondChange) use ($priority) {
            $comparisonStatus = $this->compareTags($firstChange, $secondChange);
            if ($comparisonStatus !== 0) {
                return $comparisonStatus;
            }

            if ($priority === self::PRIORITY_PACKAGES) {
                return $this->comparePackagesOverCategories($firstChange, $secondChange);
            }

            return $this->compareCategoriesOverPackages($firstChange, $secondChange);
        });

        return $changes;
    }
441351
public function setPriority($priority)
    {
        $oldPriority = $this->priority;
        $this->priority = $priority;
        if (!($this instanceof RunInterface && $this->hasStarted())
            && method_exists($this, 'dispatch')
            && $this instanceof PrioritisedInterface) {
            $this->dispatch(PriorityChangedEvent::CHANGED, new PriorityChangedEvent($this, $priority, $oldPriority));
        }
        return $this;
    }
723414
protected function _getSentryLevelFromLoggerPriority($priority){
		switch ($priority) {
			case self::EMERG:
			case self::ALERT:
			case self::CRIT:
				return amgSentry::FATAL;
			case self::ERR:
				return amgSentry::ERROR;
			case self::WARNING:
				return amgSentry::WARNING;
			case self::NOTICE:
			case self::INFO:
				return amgSentry::INFO;
			case self::DEBUG:
				return amgSentry::DEBUG;
		}

		throw new Exception(sprintf('Unknown priority "%s" in Sentry.', $priority));
	}
376937
protected function getObjectParams($priority, array $params = [])
    {
        if (!empty($params)) {
            $object = array_get($params, 'object');
            $name   = array_get($params, 'name');
        } elseif (!is_null($this->owner)) {
            $object = $this->owner;
            $name   = $this->getName($owner);
        } else {
            $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3)[2];
            $object    = array_get($backtrace, 'object');
            $name      = $this->getName(get_class($object), array_get($backtrace, 'function'));
        }
        if (!is_object($object) or is_null($name)) {
            throw new Exception('Unable to resolve logger object params');
        }

        return [
            'type_id'     => $this->logTypeId($object),
            'owner_type'  => get_class($object),
            'old_value'   => $this->old,
            'priority_id' => $this->logPrioriotyId($priority),
            'name'        => $name
        ];
    }
151458
protected function getIndexingPriority()
    {
        $priority = 0;

        if (!empty($this->indexingConfiguration['indexingPriority'])) {
            $priority = (int)$this->indexingConfiguration['indexingPriority'];
        }

        return $priority;
    }
821486
public function get(string $offset)
    {
        return isset($this->attributes[$offset]) ? $this->attributes[$offset] : '';
    }