code: private function getInStock(SaleItemInterface $item)
      {
          if (null === $subject = $this->subjectHelper->resolve($item, false)) {
              return INF;
          }
  
          if (!$subject instanceof StockSubjectInterface) {
              return INF;
          }
  
          if ($subject->isStockCompound()) {
              return INF;
          }
  
          if ($subject->getStockMode() === StockSubjectModes::MODE_DISABLED) {
              return INF;
          }
  
          return $subject->getInStock();
      }
docs: Returns the item subject's in stock quantity.
  
  @param SaleItemInterface $item
  
  @return float