original_string: public function getMissingStrengthForArmament(
          ArmamentCode $armamentCode,
          Strength $currentStrength,
          Size $bodySize
      ): int
      {
          $requiredStrength = $this->tables->getArmamentsTableByArmamentCode($armamentCode)->getRequiredStrengthOf($armamentCode);
          if ($requiredStrength === false) { // no strength is required, like for a hand
              return 0;
          }
          $missingStrength = $requiredStrength - $currentStrength->getValue();
          if ($armamentCode instanceof ArmorCode) {
              // only armor weight is related to body size
              $missingStrength += $bodySize->getValue();
          }
          if ($missingStrength < 0) {
              // missing strength can not be negative, of course
              return 0;
          }
  
          return $missingStrength;
      }
code: public function getMissingStrengthForArmament(
          ArmamentCode $armamentCode,
          Strength $currentStrength,
          Size $bodySize
      ): int
      {
          $requiredStrength = $this->tables->getArmamentsTableByArmamentCode($armamentCode)->getRequiredStrengthOf($armamentCode);
          if ($requiredStrength === false) { // no strength is required, like for a hand
              return 0;
          }
          $missingStrength = $requiredStrength - $currentStrength->getValue();
          if ($armamentCode instanceof ArmorCode) {
              // only armor weight is related to body size
              $missingStrength += $bodySize->getValue();
          }
          if ($missingStrength < 0) {
              // missing strength can not be negative, of course
              return 0;
          }
  
          return $missingStrength;
      }
code_tokens: public function getMissingStrengthForArmament ( ArmamentCode $ armamentCode , Strength $ currentStrength , Size $ bodySize ) : int { $ requiredStrength = $ this -> tables -> getArmamentsTableByArmamentCode ( $ armamentCode ) -> getRequiredStrengthOf ( $ armamentCode ) ; if ( $ requiredStrength === false ) { // no strength is required, like for a hand return 0 ; } $ missingStrength = $ requiredStrength - $ currentStrength -> getValue ( ) ; if ( $ armamentCode instanceof ArmorCode ) { // only armor weight is related to body size $ missingStrength += $ bodySize -> getValue ( ) ; } if ( $ missingStrength < 0 ) { // missing strength can not be negative, of course return 0 ; } return $ missingStrength ; }
docstring: See PPH page 91, right column
  
  @param ArmamentCode $armamentCode
  @param Size $bodySize
  @param Strength $currentStrength
  @return int positive number
  @throws \DrdPlus\Tables\Armaments\Exceptions\UnknownArmament
docstring_tokens: See PPH page 91 right column