Skip to content

Commit 90a2bb3

Browse files
committed
Use static not self so submenus added to a subclass will be the same type
1 parent 870340f commit 90a2bb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CliMenuBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function addSubMenu($id)
198198
Assertion::string($id);
199199

200200
$this->menuItems[] = $id;
201-
$this->subMenus[$id] = new self($this);
201+
$this->subMenus[$id] = new static($this);
202202

203203
return $this->subMenus[$id];
204204
}

0 commit comments

Comments
 (0)