src/Document.php
public function setLinks(array $links)
    {
        foreach ($links as $key => $link) {
            if (!($link instanceof Link)) {
                $exMsg = sprintf(
                    'Array key `%s` is not an instance of Link',
                    $key
                );
                throw new LogicException($exMsg);
            }
        }

        $this->links = $links;

        return $this;
    }
public function setLinks(array $links)
    {
        foreach ($links as $key => $link) {
            if (!($link instanceof Link)) {
                $exMsg = sprintf(
                    'Array key `%s` is not an instance of Link',
                    $key
                );
                throw new LogicException($exMsg);
            }
        }

        $this->links = $links;

        return $this;
    }
Set links

@param Link[] $links
@return $this
@throws LogicException