' . $str . ''; } $this->twinks[] = $str; } } public function print(): void { echo $this->get(); } private function get(): string { if (empty($this->twinks)) { return ''; } return 'Другие образы: ' . implode(', ', $this->twinks) . '
'; } }