I've encountered an interesting situation on the Admin.php file of episode 15 episode of your Wordpress plugin tutorial.
I had forgotten to declare
public $subpages property in the Admin class, but faced no error despite
$this->subpages was used in the register() function (the
$this->subpages = array(....was declared inside __construct() method, anyway):
$this->settings->addPages( $this->pages )->withSubPage( 'Dashboard' )->addSubPages( $this->subpages )->register();
Could you test this? If you confirm this case, what's the reason? Shouldn't the property get decalred first? I had encountered error several times before, for having not declared the property and called it inside a class method.