name = $name; $this->string = $string; $this->style = $style; } public function equals(ContentPart $other): bool { return $other instanceof self && $other->name === $this->name && $other->string === $this->string && $other->style === $this->style; } public function __toString(): string { return "counters($this->name, \"$this->string\", $this->style)"; } }