# acymailing/10.11.1/back/Libraries/Sabberworm/CSS/src/Comment/CommentContainer.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 10.11.1. 45 lines.

- Page: https://pluginprobe.com/plugins/acymailing/10.11.1/code/back/Libraries/Sabberworm/CSS/src/Comment/CommentContainer.php
- Raw: https://pluginprobe.com/plugins/acymailing/10.11.1/raw/back/Libraries/Sabberworm/CSS/src/Comment/CommentContainer.php
- Modified: 2026-06-09T07:53:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/10.11.1/code/back/Libraries/Sabberworm/CSS/src/Comment/CommentContainer.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace AcyMailing\Libraries\Sabberworm\CSS\Comment;

/**
 * Provides a standard reusable implementation of `Commentable`.
 *
 * @internal
 *
 * @phpstan-require-implements Commentable
 */
trait CommentContainer
{
    /**
     * @var list<Comment>
     */
    protected $comments = [];

    /**
     * @param list<Comment> $comments
     */
    public function addComments(array $comments): void
    {
        $this->comments = \array_merge($this->comments, $comments);
    }

    /**
     * @return list<Comment>
     */
    public function getComments(): array
    {
        return $this->comments;
    }

    /**
     * @param list<Comment> $comments
     */
    public function setComments(array $comments): void
    {
        $this->comments = $comments;
    }
}

```
