Skip to content

Commit feff87e

Browse files
committed
Fix Travis test errors
1 parent c82f0ac commit feff87e

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

src/PhpWord/Element/Table.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ class Table extends AbstractElement
4949
/**
5050
* Create a new table
5151
*
52-
* @param string $docPart
53-
* @param integer $docPartId
5452
* @param mixed $style
5553
*/
5654
public function __construct($style = null)

src/PhpWord/Shared/Html.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public static function addHtml($object, $html)
5151
/**
5252
* parse Inline style of a node
5353
*
54-
* @param $node node to check on attributes and to compile a style array
55-
* @param $style is supplied, the inline style attributes are added to the already existing style
54+
* @param \DOMNode $node Node to check on attributes and to compile a style array
55+
* @param array $style is supplied, the inline style attributes are added to the already existing style
5656
*
5757
*/
5858
protected static function parseInlineStyle($node, $style = array())
@@ -99,14 +99,18 @@ protected static function parseInlineStyle($node, $style = array())
9999
/**
100100
* parse a node and add a corresponding element to the object
101101
*
102-
* @param $node node to parse
103-
* @param $object object to add an element corresponding with the node
104-
* @param $styles array with all styles
102+
* @param \DOMNode $node node to parse
103+
* @param \PhpOffice\PhpWord\Element\AbstractElement $object object to add an element corresponding with the node
104+
* @param array $styles Array with all styles
105105
* @param $data array to transport data to a next level in the DOM tree, for example level of listitems
106106
*
107107
*/
108-
protected static function parseNode($node, $object, $styles = array('fontStyle' => array(), 'paragraphStyle' => array(), 'listStyle' => array()), $data = array())
109-
{
108+
protected static function parseNode(
109+
$node,
110+
$object,
111+
$styles = array('fontStyle' => array(), 'paragraphStyle' => array(), 'listStyle' => array()),
112+
$data = array()
113+
) {
110114
$newobject = null;
111115
switch ($node->nodeName) {
112116
case 'p':

tests/PhpWord/Tests/Element/TableTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TableTest extends \PHPUnit_Framework_TestCase
3232
*/
3333
public function testConstruct()
3434
{
35-
$oTable = new Table('section', 1);
35+
$oTable = new Table();
3636

3737
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table', $oTable);
3838
$this->assertEquals($oTable->getStyle(), null);
@@ -46,7 +46,7 @@ public function testConstruct()
4646
*/
4747
public function testStyleText()
4848
{
49-
$oTable = new Table('section', 1, 'tableStyle');
49+
$oTable = new Table('tableStyle');
5050

5151
$this->assertEquals($oTable->getStyle(), 'tableStyle');
5252
}
@@ -56,7 +56,7 @@ public function testStyleText()
5656
*/
5757
public function testStyleArray()
5858
{
59-
$oTable = new Table('section', 1, array(
59+
$oTable = new Table(array(
6060
'borderSize' => 6,
6161
'borderColor' => '006699',
6262
'cellMargin' => 80
@@ -70,7 +70,7 @@ public function testStyleArray()
7070
*/
7171
public function testWidth()
7272
{
73-
$oTable = new Table('section', 1);
73+
$oTable = new Table();
7474
$iVal = rand(1, 1000);
7575
$oTable->setWidth($iVal);
7676
$this->assertEquals($oTable->getWidth(), $iVal);
@@ -81,7 +81,7 @@ public function testWidth()
8181
*/
8282
public function testRow()
8383
{
84-
$oTable = new Table('section', 1);
84+
$oTable = new Table();
8585
$element = $oTable->addRow();
8686
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Row', $element);
8787
$this->assertCount(1, $oTable->getRows());
@@ -92,7 +92,7 @@ public function testRow()
9292
*/
9393
public function testCell()
9494
{
95-
$oTable = new Table('section', 1);
95+
$oTable = new Table();
9696
$oTable->addRow();
9797
$element = $oTable->addCell();
9898
$this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Cell', $element);
@@ -103,7 +103,7 @@ public function testCell()
103103
*/
104104
public function testCountColumns()
105105
{
106-
$oTable = new Table('section', 1);
106+
$oTable = new Table();
107107
$oTable->addRow();
108108
$element = $oTable->addCell();
109109
$this->assertEquals($oTable->countColumns(), 1);

0 commit comments

Comments
 (0)