code: public function addSource($source)
      {
          if (!is_array($source) && !($source instanceof \Traversable)) {
              throw new \InvalidArgumentException('source must be of type \Traversable|array');
          }
  
          $this->sources[] = $source;
      }
docs: @param \Traversable|array $source
  
  @throws \InvalidArgumentException