Skip to content

Commit 505cc76

Browse files
author
Roman Syroeshko
committed
Fixed build.
1 parent 94c0d02 commit 505cc76

39 files changed

+92
-92
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
88
Place announcement text here.
99

1010
### Added
11-
- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko
12-
- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko
11+
- Introduced the ``\PhpOffice\PhpWord\SimpleType\JcTable`` simple type. - @RomanSyroeshko
12+
- Introduced the ``\PhpOffice\PhpWord\SimpleType\Jc`` simple type. - @RomanSyroeshko
1313

1414
### Changed
1515
- Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371

docs/styles.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Paragraph
6363

6464
Available Paragraph style options:
6565

66-
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
66+
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
6767
- ``basedOn``. Parent style.
6868
- ``hanging``. Hanging by how much.
6969
- ``indent``. Indent by how much.
@@ -84,7 +84,7 @@ Table
8484

8585
Available Table style options:
8686

87-
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` class for the details.
87+
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\JcTable`` class for the details.
8888
- ``bgColor``. Background color, e.g. '9966CC'.
8989
- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'.
9090
- ``border(Top|Right|Bottom|Left)Size``. Border size in twips.
@@ -115,7 +115,7 @@ Image
115115

116116
Available Image style options:
117117

118-
- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
118+
- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
119119
- ``height``. Height in pixels.
120120
- ``marginLeft``. Left margin in inches, can be negative.
121121
- ``marginTop``. Top margin in inches, can be negative.
@@ -129,7 +129,7 @@ Numbering level
129129

130130
Available NumberingLevel style options:
131131

132-
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details.
132+
- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
133133
- ``font``. Font name.
134134
- ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter.
135135
- ``hanging``. See paragraph style.

samples/Sample_01_SimpleText.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
echo date('H:i:s') , ' Create new PhpWord object' , EOL;
66
$phpWord = new \PhpOffice\PhpWord\PhpWord();
77
$phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true));
8-
$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, 'spaceAfter' => 100));
8+
$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100));
99
$phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240));
1010

1111
// New portrait section

samples/Sample_08_ParagraphPagination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$phpWord = new \PhpOffice\PhpWord\PhpWord();
77
$phpWord->setDefaultParagraphStyle(
88
array(
9-
'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::BOTH,
9+
'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::BOTH,
1010
'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12),
1111
'spacing' => 120,
1212
)

samples/Sample_09_Tables.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$section->addTextBreak(1);
2727
$section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header);
2828

29-
$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER);
29+
$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER);
3030
$styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF');
3131
$styleCell = array('valign' => 'center');
3232
$styleCellBTLR = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR);
@@ -58,7 +58,7 @@
5858
$cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00');
5959
$cellRowContinue = array('vMerge' => 'continue');
6060
$cellColSpan = array('gridSpan' => 2, 'valign' => 'center');
61-
$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER);
61+
$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER);
6262
$cellVCentered = array('valign' => 'center');
6363

6464
$phpWord->addTableStyle('Colspan Rowspan', $styleTable);
@@ -89,10 +89,10 @@
8989
$section->addTextBreak(2);
9090
$section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header);
9191

92-
$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER));
92+
$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER));
9393
$cell = $table->addRow()->addCell();
9494
$cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8'));
95-
$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER))->addRow()->addCell();
95+
$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER))->addRow()->addCell();
9696
$innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8'));
9797

9898
// Save file

samples/Sample_12_HeaderFooter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$textrun = $cell->addTextRun();
1818
$textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8'));
1919
$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'));
20-
$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END));
20+
$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
2121

2222
// Add header for all other pages
2323
$subsequent = $section->addHeader();
@@ -26,7 +26,7 @@
2626

2727
// Add footer
2828
$footer = $section->addFooter();
29-
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
29+
$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
3030
$footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'));
3131

3232
// Write some text

samples/Sample_13_Images.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
$section->addTextBreak(2);
1313

1414
$section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8'));
15-
$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
15+
$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
1616
$section->addTextBreak(2);
1717

1818
// Remote image

samples/Sample_21_TableRowRules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$table1 = $section->addTable(array('cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0));
2323
$table1->addRow(3750);
2424
$cell1 = $table1->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => 'ff0000'));
25-
$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
25+
$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
2626

2727
$section->addTextBreak();
2828
$section->addText(
@@ -43,7 +43,7 @@
4343
);
4444
$table2->addRow(3750, array('exactHeight' => true));
4545
$cell2 = $table2->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => '00ff00'));
46-
$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
46+
$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
4747

4848
$section->addTextBreak();
4949
$section->addText(

samples/Sample_25_TextBox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// In section
1111
$textbox = $section->addTextBox(
1212
array(
13-
'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER,
13+
'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER,
1414
'width' => 400,
1515
'height' => 150,
1616
'borderSize' => 1,

samples/Sample_27_Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
$section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8'));
2020
$section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat'));
2121

22-
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER));
22+
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER));
2323
$textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8'));
2424
$textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar'));
2525
$textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8'));

samples/Sample_36_RTL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$textrun = $section->addTextRun();
1010
$textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8'));
1111

12-
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END));
12+
$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
1313
$textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true));
1414

1515
// Save file

src/PhpWord/Reader/RTF/Document.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace PhpOffice\PhpWord\Reader\RTF;
1919

2020
use PhpOffice\PhpWord\PhpWord;
21-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
21+
use PhpOffice\PhpWord\SimpleType\Jc;
2222

2323
/**
2424
* RTF document reader
@@ -337,7 +337,7 @@ private function parseControl($control, $parameter)
337337
'u' => array(self::STYL, 'font', 'underline', true),
338338
'strike' => array(self::STYL, 'font', 'strikethrough',true),
339339
'fs' => array(self::STYL, 'font', 'size', $parameter),
340-
'qc' => array(self::STYL, 'paragraph', 'alignment', ST_Jc::CENTER),
340+
'qc' => array(self::STYL, 'paragraph', 'alignment', Jc::CENTER),
341341
'sa' => array(self::STYL, 'paragraph', 'spaceAfter', $parameter),
342342
'fonttbl' => array(self::SKIP, 'fonttbl', null),
343343
'colortbl' => array(self::SKIP, 'colortbl', null),

src/PhpWord/SimpleType/ST_Jc.php renamed to src/PhpWord/SimpleType/Jc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @since 0.13.0
2424
*/
25-
final class ST_Jc
25+
final class Jc
2626
{
2727
const START = 'start';
2828
const CENTER = 'center';

src/PhpWord/SimpleType/ST_JcTable.php renamed to src/PhpWord/SimpleType/JcTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @since 0.13.0
2424
*/
25-
final class ST_JcTable
25+
final class JcTable
2626
{
2727
const START = 'start';
2828
const CENTER = 'center';

src/PhpWord/Style/Frame.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace PhpOffice\PhpWord\Style;
1919

20-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
20+
use PhpOffice\PhpWord\SimpleType\Jc;
2121

2222
/**
2323
* Frame defines the size and position of an object
@@ -200,7 +200,7 @@ public function getAlignment()
200200
*/
201201
public function setAlignment($value)
202202
{
203-
if (in_array($value, ST_Jc::getAllowedValues(), true)) {
203+
if (in_array($value, Jc::getAllowedValues(), true)) {
204204
$this->alignment = $value;
205205
}
206206

src/PhpWord/Style/Paragraph.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
use PhpOffice\PhpWord\Exception\InvalidStyleException;
2121
use PhpOffice\PhpWord\Shared\String;
22-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
22+
use PhpOffice\PhpWord\SimpleType\Jc;
2323

2424
/**
2525
* Paragraph style
@@ -232,7 +232,7 @@ public function getAlignment()
232232
*/
233233
public function setAlignment($value)
234234
{
235-
if (in_array($value, ST_Jc::getAllowedValues(), true)) {
235+
if (in_array($value, Jc::getAllowedValues(), true)) {
236236
$this->alignment = $value;
237237
}
238238

src/PhpWord/Style/Table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace PhpOffice\PhpWord\Style;
1919

20-
use PhpOffice\PhpWord\SimpleType\ST_JcTable;
20+
use PhpOffice\PhpWord\SimpleType\JcTable;
2121

2222
class Table extends Border
2323
{
@@ -509,7 +509,7 @@ public function getAlignment()
509509
*/
510510
public function setAlignment($value)
511511
{
512-
if (in_array($value, ST_JcTable::getAllowedValues(), true)) {
512+
if (in_array($value, JcTable::getAllowedValues(), true)) {
513513
$this->alignment = $value;
514514
}
515515

src/PhpWord/Writer/RTF/Style/Paragraph.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\RTF\Style;
1919

20-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
20+
use PhpOffice\PhpWord\SimpleType\Jc;
2121

2222
/**
2323
* RTF paragraph style writer
@@ -48,10 +48,10 @@ public function write()
4848
}
4949

5050
$alignments = array(
51-
ST_Jc::START => '\ql',
52-
ST_Jc::END => '\qr',
53-
ST_Jc::CENTER => '\qc',
54-
ST_Jc::BOTH => '\qj',
51+
Jc::START => '\ql',
52+
Jc::END => '\qr',
53+
Jc::CENTER => '\qc',
54+
Jc::BOTH => '\qj',
5555
);
5656

5757
$spaceAfter = $style->getSpaceAfter();

src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ParagraphAlignment
2929
/**
3030
* @since 0.13.0
3131
*
32-
* @param string $value Any value provided by ST_Jc simple type.
32+
* @param string $value Any value provided by Jc simple type.
3333
*
3434
* @see \PhpOffice\PhpWord\SimpleType\Jc For the allowed values of $value parameter.
3535
*/

src/PhpWord/Writer/Word2007/Element/TableAlignment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TableAlignment
2929
/**
3030
* @since 0.13.0
3131
*
32-
* @param string $value Any value provided by ST_JcTable simple type.
32+
* @param string $value Any value provided by JcTable simple type.
3333
*
3434
* @see \PhpOffice\PhpWord\SimpleType\JcTable For the allowed values of $value parameter.
3535
*/

tests/PhpWord/Tests/Element/CheckBoxTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace PhpOffice\PhpWord\Tests\Element;
1919

2020
use PhpOffice\PhpWord\Element\CheckBox;
21-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
21+
use PhpOffice\PhpWord\SimpleType\Jc;
2222
use PhpOffice\PhpWord\Style\Font;
2323

2424
/**
@@ -82,7 +82,7 @@ public function testParagraph()
8282
$oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle');
8383
$this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle());
8484

85-
$oCheckBox->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100));
85+
$oCheckBox->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100));
8686
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle());
8787
}
8888
}

tests/PhpWord/Tests/Element/ImageTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace PhpOffice\PhpWord\Tests\Element;
1919

2020
use PhpOffice\PhpWord\Element\Image;
21-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
21+
use PhpOffice\PhpWord\SimpleType\Jc;
2222

2323
/**
2424
* Test class for PhpOffice\PhpWord\Element\Image
@@ -55,7 +55,7 @@ public function testConstructWithStyle()
5555
array(
5656
'width' => 210,
5757
'height' => 210,
58-
'alignment' => ST_Jc::CENTER,
58+
'alignment' => Jc::CENTER,
5959
'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND,
6060
)
6161
);
@@ -98,7 +98,7 @@ public function testStyle()
9898
{
9999
$oImage = new Image(
100100
__DIR__ . '/../_files/images/earth.jpg',
101-
array('height' => 210, 'alignment' => ST_Jc::CENTER)
101+
array('height' => 210, 'alignment' => Jc::CENTER)
102102
);
103103

104104
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle());

tests/PhpWord/Tests/Element/PreserveTextTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace PhpOffice\PhpWord\Tests\Element;
1919

2020
use PhpOffice\PhpWord\Element\PreserveText;
21-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
21+
use PhpOffice\PhpWord\SimpleType\Jc;
2222

2323
/**
2424
* Test class for PhpOffice\PhpWord\Element\PreserveText
@@ -59,7 +59,7 @@ public function testConstructWithArray()
5959
$oPreserveText = new PreserveText(
6060
htmlspecialchars('text', ENT_COMPAT, 'UTF-8'),
6161
array('size' => 16, 'color' => '1B2232'),
62-
array('alignment' => ST_Jc::CENTER)
62+
array('alignment' => Jc::CENTER)
6363
);
6464
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle());
6565
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle());

tests/PhpWord/Tests/Element/TextTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace PhpOffice\PhpWord\Tests\Element;
1919

2020
use PhpOffice\PhpWord\Element\Text;
21-
use PhpOffice\PhpWord\SimpleType\ST_Jc;
21+
use PhpOffice\PhpWord\SimpleType\Jc;
2222
use PhpOffice\PhpWord\Style\Font;
2323

2424
/**
@@ -81,7 +81,7 @@ public function testParagraph()
8181
$oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle');
8282
$this->assertEquals('paragraphStyle', $oText->getParagraphStyle());
8383

84-
$oText->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100));
84+
$oText->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100));
8585
$this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle());
8686
}
8787
}

0 commit comments

Comments
 (0)