value; } } class Coffee { public string $flavor { get { return $this->flavor . ' Spice'; } set(string $value) { if (strlen($value) > 16) throw new InvalidArgumentException('Input is too long'); $this->flavor = $value; } } public function serve(SizeInterface $size): void { echo "\r\nServing a {$size->getSize()} coffee.\n"; } } $coffee = new Coffee(); $coffee->flavor = 'Pumpkin'; echo $coffee->flavor; $coffee->serve(Size::Grande);