setNumber($number); $this->setType($type); } /** * @return int */ public function getNumber(): int { return $this->number; } /** * @param int $number */ public function setNumber(int $number): void { $this->number = $number; } /** * @return string */ public function getType(): string { return $this->type; } /** * @param string|object $type */ public function setType($type): void { if (is_object($type)) { $type = get_class($type); } $this->type = $type; } }