private function getShieldHolding(): ItemHoldingCode
    {
        if ($this->weaponlikeHolding->holdsByMainHand()) {
            return ItemHoldingCode::getIt(ItemHoldingCode::OFFHAND);
        }
        if ($this->weaponlikeHolding->holdsByOffhand()) {
            return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND);
        }
        // two hands holding
        if ($this->shield->getValue() === ShieldCode::WITHOUT_SHIELD) {
            return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND);
        }
        throw new Exceptions\NoHandLeftForShield(
            "Can not hold {$this->shield} when holding {$this->weaponlike} with {$this->weaponlikeHolding}"
        );
    }
private function getShieldHolding(): ItemHoldingCode
    {
        if ($this->weaponlikeHolding->holdsByMainHand()) {
            return ItemHoldingCode::getIt(ItemHoldingCode::OFFHAND);
        }
        if ($this->weaponlikeHolding->holdsByOffhand()) {
            return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND);
        }
        // two hands holding
        if ($this->shield->getValue() === ShieldCode::WITHOUT_SHIELD) {
            return ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND);
        }
        throw new Exceptions\NoHandLeftForShield(
            "Can not hold {$this->shield} when holding {$this->weaponlike} with {$this->weaponlikeHolding}"
        );
    }
private function getShieldHolding ( ) : ItemHoldingCode { if ( $ this -> weaponlikeHolding -> holdsByMainHand ( ) ) { return ItemHoldingCode :: getIt ( ItemHoldingCode :: OFFHAND ) ; } if ( $ this -> weaponlikeHolding -> holdsByOffhand ( ) ) { return ItemHoldingCode :: getIt ( ItemHoldingCode :: MAIN_HAND ) ; } // two hands holding if ( $ this -> shield -> getValue ( ) === ShieldCode :: WITHOUT_SHIELD ) { return ItemHoldingCode :: getIt ( ItemHoldingCode :: MAIN_HAND ) ; } throw new Exceptions \ NoHandLeftForShield ( "Can not hold {$this->shield} when holding {$this->weaponlike} with {$this->weaponlikeHolding}" ) ; }
Gives holding opposite to given weapon holding.

@return ItemHoldingCode
@throws \DrdPlus\FightProperties\Exceptions\NoHandLeftForShield
Gives holding opposite to given weapon holding .