street, 'register_information.address.street'); self::requireFilled($this->streetNumber, 'register_information.address.street_number'); self::requireFilled($this->neighborhood, 'register_information.address.neighborhood'); self::requireFilled($this->city, 'register_information.address.city'); self::requireFilled($this->state, 'register_information.address.state'); self::requireFilled($this->zipCode, 'register_information.address.zip_code'); } public function toArray(): array { return $this->filterFilledRecursive([ 'street' => $this->street, 'complementary' => $this->complementary, 'street_number' => $this->streetNumber, 'neighborhood' => $this->neighborhood, 'city' => $this->city, 'state' => $this->state, 'zip_code' => $this->zipCode, 'reference_point' => $this->referencePoint, ]); } }