original_string: public function getProtectiveArmamentRestrictionForSkillRank(
          ProtectiveArmamentCode $protectiveArmamentCode,
          PositiveInteger $protectiveArmamentSkillRank
      ): int
      {
          $restriction = $this->getRestrictionOfProtectiveArmament($protectiveArmamentCode)
              + $this->getProtectiveArmamentRestrictionBonusForSkillRank($protectiveArmamentCode, $protectiveArmamentSkillRank);
          if ($restriction > 0) {
              return 0; // can not turn into bonus
          }
  
          return $restriction;
      }
code: public function getProtectiveArmamentRestrictionForSkillRank(
          ProtectiveArmamentCode $protectiveArmamentCode,
          PositiveInteger $protectiveArmamentSkillRank
      ): int
      {
          $restriction = $this->getRestrictionOfProtectiveArmament($protectiveArmamentCode)
              + $this->getProtectiveArmamentRestrictionBonusForSkillRank($protectiveArmamentCode, $protectiveArmamentSkillRank);
          if ($restriction > 0) {
              return 0; // can not turn into bonus
          }
  
          return $restriction;
      }
code_tokens: public function getProtectiveArmamentRestrictionForSkillRank ( ProtectiveArmamentCode $ protectiveArmamentCode , PositiveInteger $ protectiveArmamentSkillRank ) : int { $ restriction = $ this -> getRestrictionOfProtectiveArmament ( $ protectiveArmamentCode ) + $ this -> getProtectiveArmamentRestrictionBonusForSkillRank ( $ protectiveArmamentCode , $ protectiveArmamentSkillRank ) ; if ( $ restriction > 0 ) { return 0 ; // can not turn into bonus } return $ restriction ; }
docstring: Restriction is Fight number malus.
  
  @param ProtectiveArmamentCode $protectiveArmamentCode
  @param PositiveInteger $protectiveArmamentSkillRank
  @return int
  @throws \DrdPlus\Tables\Armaments\Partials\Exceptions\UnexpectedSkillRank
  @throws \DrdPlus\Tables\Armaments\Exceptions\UnknownProtectiveArmament
docstring_tokens: Restriction is Fight number malus .