Skip to content

Commit a6568e9

Browse files
committed
Proposed simplified docblock
1 parent 72bb688 commit a6568e9

File tree

2 files changed

+39
-22
lines changed

2 files changed

+39
-22
lines changed

src/PhpWord/PhpWord.php

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,11 @@
22
/**
33
* PHPWord
44
*
5-
* Copyright (c) 2014 PHPWord
5+
* PHP version 5.3
66
*
7-
* This library is free software; you can redistribute it and/or
8-
* modify it under the terms of the GNU Lesser General Public
9-
* License as published by the Free Software Foundation; either
10-
* version 2.1 of the License, or (at your option) any later version.
11-
*
12-
* This library is distributed in the hope that it will be useful,
13-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
* Lesser General Public License for more details.
16-
*
17-
* You should have received a copy of the GNU Lesser General Public
18-
* License along with this library; if not, write to the Free Software
19-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20-
*
21-
* @copyright Copyright (c) 2014 PHPWord
22-
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
23-
* @version 0.9.0
7+
* @copyright 2014 PHPWord
8+
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
9+
* @version 0.9.0
2410
*/
2511

2612
namespace PhpOffice\PhpWord;

tests/PhpWord/Tests/PhpWordTest.php

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
<?php
2+
/**
3+
* PHPWord
4+
*
5+
* PHP version 5.3
6+
*
7+
* @copyright 2014 PHPWord
8+
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
9+
* @version 0.9.0
10+
*/
11+
212
namespace PhpOffice\PhpWord\Tests;
313

414
use PhpOffice\PhpWord\PhpWord;
@@ -7,13 +17,16 @@
717
use PhpOffice\PhpWord\Style;
818

919
/**
10-
* @coversDefaultClass \PhpOffice\PhpWord\PhpWord
20+
* Test for PHPWord main class
21+
*
22+
* @coversDefaultClass \PhpOffice\PhpWord\PhpWord
1123
* @runTestsInSeparateProcesses
1224
*/
1325
class PhpWordTest extends \PHPUnit_Framework_TestCase
1426
{
1527
/**
16-
* @covers ::__construct
28+
* Test object creation
29+
*
1730
* @covers ::getDocumentProperties
1831
* @covers ::getDefaultFontName
1932
* @covers ::getDefaultFontSize
@@ -27,6 +40,8 @@ public function testConstruct()
2740
}
2841

2942
/**
43+
* Test set/get document properties
44+
*
3045
* @covers ::setDocumentProperties
3146
* @covers ::getDocumentProperties
3247
*/
@@ -41,6 +56,8 @@ public function testSetGetDocumentProperties()
4156
}
4257

4358
/**
59+
* Test create/get section
60+
*
4461
* @covers ::createSection
4562
* @covers ::getSections
4663
*/
@@ -53,6 +70,8 @@ public function testCreateGetSections()
5370
}
5471

5572
/**
73+
* Test set/get default font name
74+
*
5675
* @covers ::setDefaultFontName
5776
* @covers ::getDefaultFontName
5877
*/
@@ -66,6 +85,8 @@ public function testSetGetDefaultFontName()
6685
}
6786

6887
/**
88+
* Test set/get default font size
89+
*
6990
* @covers ::setDefaultFontSize
7091
* @covers ::getDefaultFontSize
7192
*/
@@ -79,6 +100,8 @@ public function testSetGetDefaultFontSize()
79100
}
80101

81102
/**
103+
* Test set default paragraph style
104+
*
82105
* @covers ::setDefaultParagraphStyle
83106
* @covers ::loadTemplate
84107
*/
@@ -90,6 +113,8 @@ public function testSetDefaultParagraphStyle()
90113
}
91114

92115
/**
116+
* Test add styles
117+
*
93118
* @covers ::addParagraphStyle
94119
* @covers ::addFontStyle
95120
* @covers ::addTableStyle
@@ -114,6 +139,8 @@ public function testAddStyles()
114139
}
115140

116141
/**
142+
* Test add title style
143+
*
117144
* @covers ::addTitleStyle
118145
*/
119146
public function testAddTitleStyle()
@@ -126,6 +153,8 @@ public function testAddTitleStyle()
126153
}
127154

128155
/**
156+
* Test load template
157+
*
129158
* @covers ::loadTemplate
130159
*/
131160
public function testLoadTemplate()
@@ -140,14 +169,16 @@ public function testLoadTemplate()
140169
}
141170

142171
/**
143-
* @covers ::loadTemplate
172+
* Test load template exception
173+
*
174+
* @covers ::loadTemplate
144175
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
145176
*/
146177
public function testLoadTemplateException()
147178
{
148179
$templateFqfn = \join(
149180
\DIRECTORY_SEPARATOR,
150-
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', 'data', 'templates', 'blanks.docx')
181+
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'templates', 'blanks.docx')
151182
);
152183
$phpWord = new PhpWord();
153184
$phpWord->loadTemplate($templateFqfn);

0 commit comments

Comments
 (0)