File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 21
21
$ section ->addTextBreak (2 );
22
22
23
23
// Let's create a comment that we will link to a start element and an end element
24
- $ commentWithStartAndEnd = new \PhpOffice \PhpWord \Element \Comment ('Foo Bar ' , new \DateTime (), '' );
24
+ $ commentWithStartAndEnd = new \PhpOffice \PhpWord \Element \Comment ('Foo Bar ' , new \DateTime ());
25
25
$ commentWithStartAndEnd ->addText ('A comment with a start and an end ' );
26
26
$ phpWord ->addComment ($ commentWithStartAndEnd );
27
27
36
36
$ section ->addTextBreak (2 );
37
37
38
38
// Let's add a comment on an image
39
- $ commentOnImage = new \PhpOffice \PhpWord \Element \Comment ('Mr Smart ' , new \DateTime (), '' );
39
+ $ commentOnImage = new \PhpOffice \PhpWord \Element \Comment ('Mr Smart ' , new \DateTime ());
40
40
$ imageComment = $ commentOnImage ->addTextRun ();
41
41
$ imageComment ->addText ('Hey, Mars does look ' );
42
42
$ imageComment ->addText ('red ' , array ('color ' => 'FF0000 ' ));
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class Comment extends TrackChange
57
57
* @param \DateTime $date
58
58
* @param string $initials
59
59
*/
60
- public function __construct ($ author , $ date , $ initials )
60
+ public function __construct ($ author , $ date = null , $ initials = null )
61
61
{
62
62
parent ::__construct ($ author , $ date );
63
63
$ this ->initials = $ initials ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class TrackChange extends AbstractContainer
47
47
* @param string $author
48
48
* @param \DateTime $date
49
49
*/
50
- public function __construct ($ author , \DateTime $ date )
50
+ public function __construct ($ author , \DateTime $ date = null )
51
51
{
52
52
$ this ->author = $ author ;
53
53
$ this ->date = $ date ;
You can’t perform that action at this time.
0 commit comments