Commit aa29430f authored by Marcelo Rivera's avatar Marcelo Rivera
Browse files

(fix): add phpdoc and also support string urns

parent 56163626
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -272,8 +272,16 @@ class Manager
        return null;
        return null;
    }
    }


    public function getByUrn(Urn $urn)
    /**
     * @param string|Urn $urn
     * @return Comment|null
     * @throws \Exception
     */
    public function getByUrn($urn)
    {
    {
        if (is_string($urn)) {
            $urn = new Urn($urn);
        }
        $components = explode(':', $urn->getNss());
        $components = explode(':', $urn->getNss());


        if (count($components) !== 5) {
        if (count($components) !== 5) {