To create a comment, create an object Comment.
Example:
use PhpOffice\PhpPresentation\Shape\Comment;
$oComment = new Comment();
$oSlide->addShape($oComment);
You can define text and date with setters.
Example:
use PhpOffice\PhpPresentation\Shape\Comment;
$oComment = new Comment();
$oComment->setText('Text of the Comment');
$oComment->setDate(time());
$oSlide->addShape($oComment);
For a comment, you can define the author.
Example:
use PhpOffice\PhpPresentation\Shape\Comment;
use PhpOffice\PhpPresentation\Shape\Comment\Author;
$oAuthor = new Author();
$oComment = new Comment();
$oComment->setAuthor($oAuthor);
$oSlide->addShape($oComment);
You can define name and initials with setters.
Example:
use PhpOffice\PhpPresentation\Shape\Comment;
use PhpOffice\PhpPresentation\Shape\Comment\Author;
$oAuthor = new Author();
$oAuthor->setName('Name of the author');
$oAuthor->setInitals('Nota');
$oComment = new Comment();
$oComment->setAuthor($oAuthor);
$oSlide->addShape($oComment);