site || '' !== $this->title || '' !== $this->type || '' !== $this->outline; } /** @param string[] $notes */ public function with_notes( array $notes ): self { return new self( $this->site, $this->title, $this->type, $this->outline, $this->style, array_values( $notes ) ); } /** @return array Non-empty fields; the shape the legacy API used. */ public function to_array(): array { return array_filter( array( 'site' => $this->site, 'title' => $this->title, 'type' => $this->type, 'outline' => $this->outline, 'style' => $this->style, ), static fn( string $s ): bool => '' !== $s ); } }