PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Libraries / Sabberworm / CSS / src / Comment / CommentContainer.php

CommentContainer.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress trunk, at back/Libraries/Sabberworm/CSS/src/Comment/CommentContainer.php

45 lines 803 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace AcyMailing\Libraries\Sabberworm\CSS\Comment;
6
7 /**
8 * Provides a standard reusable implementation of `Commentable`.
9 *
10 * @internal
11 *
12 * @phpstan-require-implements Commentable
13 */
14 trait CommentContainer
15 {
16 /**
17 * @var list<Comment>
18 */
19 protected $comments = [];
20
21 /**
22 * @param list<Comment> $comments
23 */
24 public function addComments(array $comments): void
25 {
26 $this->comments = \array_merge($this->comments, $comments);
27 }
28
29 /**
30 * @return list<Comment>
31 */
32 public function getComments(): array
33 {
34 return $this->comments;
35 }
36
37 /**
38 * @param list<Comment> $comments
39 */
40 public function setComments(array $comments): void
41 {
42 $this->comments = $comments;
43 }
44 }
45