options = $options; } /** * @param mixed $default * * @return mixed */ public function get(string $property, $default = null) { return $this->options[$property] ?? $default; } public function extend(array $options): Config { return new Config(array_merge($this->options, $options)); } public function withDefaults(array $defaults): Config { return new Config($this->options + $defaults); } }