code: public function add(string $key, $value): self
      {
          if (! array_key_exists($key, $this->props)) {
              return $this->addNew($key, $value);
          }
  
          if (is_array($this->props[$key])) {
              return $this->addArray($key, $value);
          }
  
          return $this->appendToArray($key, $value);
      }
docs: add new item to props
  
  @param mixed $value