Skip to content

Commit 85a2e21

Browse files
committed
#126 : Support for Comments (PHPCS Fixes)
1 parent 833b587 commit 85a2e21

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/PhpPresentation/Writer/PowerPoint2007/CommentAuthors.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function render()
1818
* @var Author[]
1919
*/
2020
$arrayAuthors = array();
21-
foreach ($this->getPresentation()->getAllSlides() as $numSlide => $oSlide) {
21+
foreach ($this->getPresentation()->getAllSlides() as $oSlide) {
2222
foreach ($oSlide->getShapeCollection() as $oShape) {
2323
if (!($oShape instanceof Comment)) {
2424
continue;
@@ -54,7 +54,7 @@ protected function writeCommentsAuthors($arrayAuthors)
5454
$objWriter->writeAttribute('xmlns:p', 'http://schemas.openxmlformats.org/presentationml/2006/main');
5555

5656
$idxAuthor = 0;
57-
foreach ($arrayAuthors as $hashAuthor => $oAuthor) {
57+
foreach ($arrayAuthors as $oAuthor) {
5858
$oAuthor->setIndex($idxAuthor++);
5959

6060
// p:cmAuthor
@@ -72,4 +72,4 @@ protected function writeCommentsAuthors($arrayAuthors)
7272

7373
return $objWriter->getData();
7474
}
75-
}
75+
}

src/PhpPresentation/Writer/PowerPoint2007/PptComments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ protected function writeSlideComments(Slide $oSlide)
8181

8282
return $objWriter->getData();
8383
}
84-
}
84+
}

src/PhpPresentation/Writer/PowerPoint2007/Relationships.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function writePresentationRelationships()
110110

111111

112112
// Comments Authors
113-
foreach ($this->getPresentation()->getAllSlides() as $numSlide => $oSlide) {
113+
foreach ($this->getPresentation()->getAllSlides() as $oSlide) {
114114
foreach ($oSlide->getShapeCollection() as $oShape) {
115115
if (!($oShape instanceof Comment)) {
116116
continue;

tests/PhpPresentation/Tests/Writer/PowerPoint2007/RelationshipsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ public function testCommentsAuthors()
1919
$pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
2020
$this->assertTrue($pres->elementExists('/Relationships/Relationship[@Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"]', 'ppt/_rels/presentation.xml.rels'));
2121
}
22-
}
22+
}

0 commit comments

Comments
 (0)