@param int|string $level

@return static
355774
public function setLevel($level)
    {
        if (is_numeric($level)) {
            $this->_level = (int)$level;
        } else {
            $this->_level = array_search($level, self::$_levels, true);
        }

        return $this;
    }
587978
public static function getLevelName($level)
    {
        if (!isset(static::$levels[$level])) {
            throw new \InvalidArgumentException('Level "' . $level . '" is not defined, use one of: ' . implode(', ', array_keys(static::$levels)));
        }

        return static::$levels[$level];
    }
988366
final public function setMinLevel($minLevel)
    {
        if (isset($this->levels[$minLevel])) {
            $this->minLevel = $this->levels[$minLevel];
        }
        
        return $this;
    }
306145
public function setLevel($level)
    {
        if (!($level >= 0.01 && $level <= 4.99)) {
            throw new \InvalidArgumentException("Gamma Level Must Be In Range(0.01,4.99)");
        }
        $this->level = (float) $level;

        return $this;
    }
1231807
public static function getLogger($level = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

        if (empty(static::$logger)) {
            static::setLogger($level);
        }

        return static::$logger;
    }
492162
public function brightness($level)
    {
        //Argument 1 must be a number
        Argument::i()->test(1, 'numeric');

        //apply filter
        imagefilter($this->resource, IMG_FILTER_BRIGHTNESS, $level);

        return $this;
    }
854517
public function generate($level = 0) {
        $this->getCode();
        $this->loadConfigs();
        $this->width = $this->configs['width'];
        $this->height = $this->configs['height'];
        $this->createBg();
        $this->createText();
        $this->createLine($level);
        return $this;
    }
1292123
public function setLogLevel($level= xPDO::LOG_LEVEL_FATAL) {
        $oldLevel = $this->logLevel;
        $this->logLevel= intval($level);
        return $oldLevel;
    }
1088564
public function getXp(int $level)
    {
        $xpTable = $this->getXpTable();

        if (!isset($xpTable[$level])) {
            return false;
        }

        return $xpTable[$level];
    }
407629
public function factory($var, $level = 1)
    {
        $result = null;

        if (null === $var) {
            $result = clone($this->types['type_null']);
        } elseif (is_bool($var)) {
            $result = clone($this->types['type_bool']);
        } elseif (is_string($var)) {
            $result = clone($this->types['type_string']);
        } elseif (is_int($var)) {
            $result = clone($this->types['type_int']);
        } elseif (is_float($var)) {
            $result = clone($this->types['type_float']);
        } elseif (is_array($var)) {
            $result = clone($this->types['type_array']);
        } elseif (is_object($var)) {
            $result = clone($this->types['type_object']);
        } elseif ($this->isResource($var)) {
            $result = clone($this->types['type_resource']);
        }

        /** @var TypeInterface $result */
        $result->load($var, $level);

        return $result;
    }
242950
public function setProfiler($level = self::PROFILE_ALL, $slowms = 100) {

        return $this->db->command([
            'profile' => (int)$level,
            'slowms'  => (int)$slowms
        ]);
    }
68284
public static function getLevelNumeric(string $level)
    {
        return isset(self::$LEVEL_NUMERIC[$level]) ? self::$LEVEL_NUMERIC[$level] : 0;
    }
974011
public function setIsolationLevel(string $level) : array
    {
        if (!\in_array($level, static::ISOLATION_LEVELS, true)) {
            throw new InvalidIsolationLevelException();
        }

        static $oldIsolationLevel;
        if (!$oldIsolationLevel) {
            $oldIsolationLevel = $this->query('SHOW transaction_isolation')[0]['transaction_isolation'];
        }

        $this->query("SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL $level");
        $oldIsolationLevel = $level;

        return [$oldIsolationLevel, $level];
    }
1029480
public function setLevel($level)
    {
        if (false === Numeric::isPositiveInteger($level, false)) {
            throw new InvalidArgumentException('A nested level must be a positive integer.');
        }
        $this->_level = $level;
        return $this;
    }
461417
public function setBGColor($level, ForegroundColors $color)
    {
        if (static::$foregroundColorMap === null) {
            $this->resetBGColor();
        }
        $this->checkLevel($level);
        static::$foregroundColorMap[$level] = $color;
        return $this;
    }
1040852
public function factory($type, $level = 0)
    {
        $result = null;

        if (!array_key_exists('type_extended_' . $type, $this->types)) {
            throw new InvalidTypeException;
        }

        /** @var $result ExtendedTypeInterface */
        $result = clone($this->types['type_extended_' . $type]);
        $result->setLevel($level);

        return $result;
    }
1356886
public function setFGColor($level, ForegroundColors $color)
    {
        if (static::$foregroundColorMap === null) {
            $this->resetFGColors();
        }
        $this->checkLevel($level);
        static::$foregroundColorMap[$level] = $color;
        return $this;
    }