code: public function addItem(Item $item)
      {
          if ($this->items == null) {
              $this->items = [];
          }
  
          $this->items[] = $item;
  
          return $this;
      }
docs: @param Item $item
  
  @return Cart