Even shield can ba used as weapon, just quite ineffective.

@param WeaponlikeCode $weaponlikeCode
@return int
@throws \DrdPlus\Tables\Armaments\Exceptions\UnknownWeaponlike
428578
public function getWoundsOfWeaponlike(WeaponlikeCode $weaponlikeCode): int
    {
        return $this->tables->getWeaponlikeTableByWeaponlikeCode($weaponlikeCode)->getWoundsOf($weaponlikeCode);
    }
222386
public function canHoldItByTwoHands(WeaponlikeCode $weaponToHoldByTwoHands): bool
    {
        return
            // shooting weapons are two-handed (except mini-crossbow), projectiles are not
            $this->isTwoHandedOnly($weaponToHoldByTwoHands) // the weapon is explicitly two-handed
            // or it is melee weapon with length at least 1 (see PPH page 92 right column)
            || ($weaponToHoldByTwoHands->isMelee() && $this->getLengthOfWeaponOrShield($weaponToHoldByTwoHands) >= 1);
    }
82044
public static function rpcCodeFromHttpStatusCode($httpStatusCode)
    {
        if (array_key_exists($httpStatusCode, self::$httpStatusCodeToRpcCodeMap)) {
            return self::$httpStatusCodeToRpcCodeMap[$httpStatusCode];
        }
        return ApiStatus::UNRECOGNIZED_CODE;
    }
724205
public function item($code)
    {
        if( empty(Properties::$items) )
        {
            return false;
        }

        foreach( Properties::$items as $row )
        {
            if( ! is_array($code) )
            {
                $key = array_search($code, $row);
            }
            else
            {
                if( isset($row[key($code)]) && $row[key($code)] == current($code) )
                {
                    $key = $row;
                }
            }

            if( ! empty($key) )
            {
                return (object) $row;
            }
        }
    }
763572
private function filterStatus($code): int
    {
        if (!is_numeric($code)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Status code "%s" is not numeric.',
                    is_scalar($code) ? $code : gettype($code)
                )
            );
        }

        $result = (int) $code;
        if (!self::isValid($result)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid status code "%s".',
                    $result
                )
            );
        }

        return $result;
    }
1043591
public function getAuthorizationCode($code)
    {
        $code = $this->collection('code_table')->findOne(array(
            'authorization_code' => $code
        ));
        return is_null($code) ? false : $code;
    }
730218
public function withStatus($code = 200)
    {
        if (!array_key_exists($code, self::$responseCodes)) {
            throw new \Exception('That header code '.$code.' is not allowed.');
        }

        $this->code = $code;
        $this->reasonPhrase = self::$responseCodes[$code];

        return $this;
    }
131021
public function getAuthorizationCode($code)
    {
        $sql  = sprintf('SELECT * from %s where authorization_code = :code', $this->config['code_table']);
        $code = $this->fetch($sql, compact('code'));
        if ($code) {
            // convert date string back to timestamp
            $code['expires'] = strtotime($code['expires']);
        }

        return $code;
    }
1041938
public static function get( $code = 200 )
	{
		if( isset( self::$http_status_codes[$code] ) )
		{
			return( self::$http_status_codes[ $code ] );
		}
		return( false );
	}
901879
public function execute($exitCode = false): int
	{
		$migrations = $this->getOutstanding();

		if(($count = count($migrations)) > 0)
		{
			$message = $count === 1 ? 'There is %s outstanding migration:' : 'There are %s outstanding migrations:';

			$this->write(vsprintf($message, ['<yellow>' . $count . '</yellow>']) . PHP_EOL);

			$this->outputMigrationList($migrations);
		}
		else
		{
			$this->write('<green>There are no outstanding migrations.</green>');
		}

		return ($exitCode && $count > 0) ? static::STATUS_ERROR : static::STATUS_SUCCESS;
	}
1298233
protected function validateResponseCode($code) {
        $code = (int) $code;

        try {
            Assertion::range($code, 100, 599, sprintf('Response code must be between 100 and 599, got %d.', $code));
        } catch (AssertionFailure $e) {
            throw new InvalidArgumentException($e->getMessage());
        }

        return $code;
    }
961373
public function setHttpCode($httpCode)
    {
        if (!array_key_exists($httpCode, $this->httpCodes)) {
            throw new \Parable\Http\Exception("Invalid HTTP code set: '{$httpCode}'");
        }
        $this->httpCode = $httpCode;
        return $this;
    }
1113858
public static function get_menu_item($code)
    {
        $menuItems = self::get_menu_items();
        return (isset($menuItems[$code])) ? $menuItems[$code] : false;
    }
156089
protected function _getInstallmentsHelperFromPaymentMethod($methodCode)
    {
        $helperClassName = $this->_scopeConfig->getValue('installments/payment_methods/'
            . $methodCode . '/installments_helper');
        $helper = $this->_helperFactory->get($helperClassName);
        if (false === $helper instanceof \Magento\Framework\App\Helper\AbstractHelper) {
            throw new \LogicException($helperClassName .
                ' doesn\'t extend Magento\Framework\App\Helper\AbstractHelper');
        }

        return $helper;
    }
135887
public static function validateCloseCode($code)
    {
        return !($code < 1000 || //Not used
            $code > 5000 || //Invalid
            ($code > 1015 && $code < 3000) || //Range 1000-2999 is reserved for protocol, but currently there are no codes above 1015
            $code === 1004 || //Reserved
            $code === self::CODE_NO_STATUS || //Reserved (internal app usage)
            $code === self::CODE_ABNORMAL || //Reserved (internal app usage)
            ($code > 1011 && $code <= 1015) //Not defined by RFC, but from reserved range (exc. 1015 is reserved for app int. use)
        );
    }
366885
public function removeLikeCountersOfType($likeableType, $type = null)
    {
        if (class_exists($likeableType)) {
            /** @var \Cog\Likeable\Contracts\Likeable $likeable */
            $likeable = new $likeableType;
            $likeableType = $likeable->getMorphClass();
        }

        /** @var \Illuminate\Database\Eloquent\Builder $counters */
        $counters = app(LikeCounterContract::class)->where('likeable_type', $likeableType);
        if (!is_null($type)) {
            $counters->where('type_id', $this->getLikeTypeId($type));
        }
        $counters->delete();
    }
788380
public static function getLanguageForCode($code)
    {
        $language = KlarnaLanguage::fromCode($code);

        if ($language === null) {
            throw new Klarna_UnknownLanguageException($code);
        }
        return $language;
    }