object = $object; return $this; } /** * Get the involved object * * @return Model */ public function getObject(): Model { if ($this->object === null) { throw new \LogicException( 'You are accessing an unset property. Please make sure to set it beforehand.' ); } return $this->object; } }