@param int $errorNo

@return int
180414
public static function fromPhpErrorNo($errorNo)
	{
		switch ($errorNo)
		{
			case E_ERROR:
				return self::ERROR;
			case E_WARNING:
				return self::WARNING;
			case E_PARSE:
				return self::ERROR;
			case E_NOTICE:
				return self::NOTICE;
			case E_CORE_ERROR:
				return self::ERROR;
			case E_CORE_WARNING:
				return self::WARNING;
			case E_COMPILE_ERROR:
				return self::ERROR;
			case E_COMPILE_WARNING:
				return self::WARNING;
			case E_USER_ERROR:
				return self::ERROR;
			case E_USER_WARNING:
				return self::WARNING;
			case E_USER_NOTICE:
				return self::NOTICE;
			case E_STRICT:
				return self::INFO;
			case E_RECOVERABLE_ERROR:
				return self::ERROR;
			case E_DEPRECATED:
				return self::WARNING;
			case E_USER_DEPRECATED:
				return self::WARNING;
		}

		return self::ERROR;
	}
170790
public function getMessageString($errorCode)
	{
		return isset($this->errorMessages[$errorCode]) ? $this->errorMessages[$errorCode] : null;
	}
202610
public function getCharacterCountBits(Version $version) : int
    {
        $number = $version->getVersionNumber();

        if ($number <= 9) {
            $offset = 0;
        } elseif ($number <= 26) {
            $offset = 1;
        } else {
            $offset = 2;
        }

        return $this->characterCountBitsForVersions[$offset];
    }
62526
public static function errToException($turnOn = true)
    {
        if (!$turnOn) {
            return set_error_handler(null);
        }

        /*
         * Error handler
         *
         * @param int $errno
         * @param string $errStr
         * @param string $errFile
         * @param int $errLine
         *
         * @throws ErrorException
         */
        $handler = function ($errno, $errStr, $errFile, $errLine) {
            // This error code is not included in error_reporting
            if (!(error_reporting() & $errno)) {
                return;
            }
            throw new ErrorException($errStr, 0, $errno, $errFile, $errLine);
        };

        return set_error_handler($handler);
    }
551539
protected function translateErrorType($errorint)
    {
        if (isset($this->errorTranslation[$errorint]) === true) {
            return $this->errorTranslation[$errorint];
        }

        // Fallback to 'unknown'.
        return array('Unknown error', 'unknown');
    }
973021
public function setNumber($no)
    {
        $this->info('Setting Buildnumber to:'.$no);
        $this->setProperty('build.number', $no);
        $this->no = $no;
    }
414932
public function getInt($ann, $default = 0) {
        return isset($this->annotations[ $ann ]) ? intval(trim($this->annotations[ $ann ])) : $default;
    }
890854
private function raiseException($errorNum)
    {
        $errMessage = isset($this->listError[$errorNum]) ? $this->listError[$errorNum] : 'Unknown Exception';

        throw new \Exception($errMessage, $errorNum);
    }
1054744
public static function getLevel($errno)
    {
        if (self::isError($errno)) {
            return 'error';
        }
        if (self::isWarning($errno)) {
            return 'warning';
        }
        if (self::isNotice($errno)) {
            return 'notice';
        }
        return 'error';
    }
1070509
public function skip(int $n) : int
    {
        if ($n <= 0) {
            return 0;
        }

        $skipped = 0;
        $skipLimit = min(self::MAX_SKIP_BUFFER_SIZE, $n);
        while ($skipped < $n) {
            $buf = $this->read(min($skipLimit, $n - $skipped));
            if ($buf === null) {
                break;
            }
            $skipped += strlen($buf);
        }
        return $skipped;
    }
1039651
public static function toInt($o) : ?int
    {
        if (is_int($o) === true || is_float($o) === true) {
            return intval($o);
        } else {
            if (is_bool($o) === true) {
                return ($o) ? 1 : 0;
            } elseif (is_numeric($o) === true && $o !== "") {
                return intval($o + 0);
            }

            return null;
        }
    }
170072
public function queryRefund($orderNo, $type = self::OUT_TRADE_NO)
    {
        $params = [
            $type => $orderNo,
        ];

        return $this->request(self::API_QUERY_REFUND, $params);
    }
1045061
private function getJsonErrorMessage($errorCode)
    {
        switch ($errorCode) {
            case JSON_ERROR_NONE:
                return 'JSON_ERROR_NONE';
            case JSON_ERROR_DEPTH:
                return 'JSON_ERROR_DEPTH';
            case JSON_ERROR_STATE_MISMATCH:
                return 'JSON_ERROR_STATE_MISMATCH';
            case JSON_ERROR_CTRL_CHAR:
                return 'JSON_ERROR_CTRL_CHAR';
            case JSON_ERROR_SYNTAX:
                return 'JSON_ERROR_SYNTAX';
            case JSON_ERROR_UTF8:
                return 'JSON_ERROR_UTF8';
            case constant('JSON_ERROR_RECURSION'):
                return 'JSON_ERROR_RECURSION';
            case constant('JSON_ERROR_INF_OR_NAN'):
                return 'JSON_ERROR_INF_OR_NAN';
            case constant('JSON_ERROR_UNSUPPORTED_TYPE'):
                return 'JSON_ERROR_UNSUPPORTED_TYPE';
            default:
                throw new LogicException(sprintf('Unknown JSON decoding error code %d encountered', $errorCode));
        }
    }
1247846
public function getError($errorCode) {
        if (array_key_exists($errorCode, $this->_errors)) {
            $result = $this->_errors[$errorCode];
            return $result;
        } else {
            return null;
        }
    }
1341918
protected function gerarNossoNumero()
    {
        $numero_boleto = $this->getNumero();
        return Util::numberFormatGeral($numero_boleto, 7) . CalculoDV::bnbNossoNumero($this->getNumero());
    }
1367604
public function errorHandler(int $error_number, string $error_message) {
    switch ($error_number) {
      case E_RECOVERABLE_ERROR:
        throw new Exception($error_message, $error_number);
    }
  }
643398
protected function num($n)
    {
        if (!is_numeric($n)) {
            return $n;
        }
        $broken_number = explode('.', (string)$n);
        if (isset($broken_number[1])) {
            return number_format($broken_number[0], 0, ',', '.').','.$broken_number[1];
        }
        return number_format($broken_number[0], 0, ',', '.');
    }