Skip to content

Commit 8bbd65d

Browse files
committed
Fix Phpstan for Php7.2/3
1 parent 6bdb27a commit 8bbd65d

File tree

3 files changed

+0
-49
lines changed

3 files changed

+0
-49
lines changed

phpstan-baseline.php7.neon

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,16 +1340,6 @@ parameters:
13401340
count: 1
13411341
path: tests/PhpWordTests/TestableTemplateProcesor.php
13421342

1343-
-
1344-
message: "#^Cannot access property \\$length on DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1345-
count: 9
1346-
path: tests/PhpWordTests/Writer/HTML/ElementTest.php
1347-
1348-
-
1349-
message: "#^Cannot call method item\\(\\) on DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1350-
count: 11
1351-
path: tests/PhpWordTests/Writer/HTML/ElementTest.php
1352-
13531343
-
13541344
message: "#^Parameter \\#2 \\$libraryBaseDir of static method PhpOffice\\\\PhpWord\\\\Settings\\:\\:setPdfRenderer\\(\\) expects string, string\\|false given\\.$#"
13551345
count: 3
@@ -1385,26 +1375,11 @@ parameters:
13851375
count: 1
13861376
path: tests/PhpWordTests/Writer/Word2007/Element/ChartTest.php
13871377

1388-
-
1389-
message: "#^Call to an undefined method object\\:\\:write\\(\\)\\.$#"
1390-
count: 1
1391-
path: tests/PhpWordTests/Writer/Word2007/ElementTest.php
1392-
1393-
-
1394-
message: "#^Call to an undefined method object\\:\\:write\\(\\)\\.$#"
1395-
count: 1
1396-
path: tests/PhpWordTests/Writer/Word2007/StyleTest.php
1397-
13981378
-
13991379
message: "#^Method PhpOffice\\\\PhpWordTests\\\\XmlDocument\\:\\:getElement\\(\\) should return DOMElement\\|null but returns DOMNode\\|null\\.$#"
14001380
count: 1
14011381
path: tests/PhpWordTests/XmlDocument.php
14021382

1403-
-
1404-
message: "#^Method PhpOffice\\\\PhpWordTests\\\\XmlDocument\\:\\:getNodeList\\(\\) should return DOMNodeList\\<DOMNode\\> but returns DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1405-
count: 1
1406-
path: tests/PhpWordTests/XmlDocument.php
1407-
14081383
-
14091384
message: "#^Property PhpOffice\\\\PhpWordTests\\\\XmlDocument\\:\\:\\$path \\(string\\) does not accept string\\|false\\.$#"
14101385
count: 1

phpstan-baseline.php73.neon

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,16 +1340,6 @@ parameters:
13401340
count: 1
13411341
path: tests/PhpWordTests/TestableTemplateProcesor.php
13421342

1343-
-
1344-
message: "#^Cannot access property \\$length on DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1345-
count: 9
1346-
path: tests/PhpWordTests/Writer/HTML/ElementTest.php
1347-
1348-
-
1349-
message: "#^Cannot call method item\\(\\) on DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1350-
count: 11
1351-
path: tests/PhpWordTests/Writer/HTML/ElementTest.php
1352-
13531343
-
13541344
message: "#^Parameter \\#2 \\$libraryBaseDir of static method PhpOffice\\\\PhpWord\\\\Settings\\:\\:setPdfRenderer\\(\\) expects string, string\\|false given\\.$#"
13551345
count: 3
@@ -1400,11 +1390,6 @@ parameters:
14001390
count: 1
14011391
path: tests/PhpWordTests/XmlDocument.php
14021392

1403-
-
1404-
message: "#^Method PhpOffice\\\\PhpWordTests\\\\XmlDocument\\:\\:getNodeList\\(\\) should return DOMNodeList\\<DOMNode\\> but returns DOMNodeList\\<DOMNode\\>\\|false\\.$#"
1405-
count: 1
1406-
path: tests/PhpWordTests/XmlDocument.php
1407-
14081393
-
14091394
message: "#^Property PhpOffice\\\\PhpWordTests\\\\XmlDocument\\:\\:\\$path \\(string\\) does not accept string\\|false\\.$#"
14101395
count: 1

phpstan.neon.php7.dist

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ parameters:
3535
-
3636
message: '#Parameter \#1 \$function of function call_user_func_array expects callable\(\): mixed, array{PhpOffice\\PhpWord\\Writer\\PDF\\AbstractRenderer, string} given.#'
3737
path: src/PhpWord/Writer/PDF.php
38-
-
39-
message: '#PHPDoc tag @var with type PhpOffice\\PhpWord\\Element\\AbstractElement is not subtype of native type #'
40-
path: tests/PhpWordTests/Element/AbstractElementTest.php
41-
-
42-
message: '#PHPDoc tag @var with type PhpOffice\\PhpWord\\Style\\AbstractStyle is not subtype of native type #'
43-
path: tests/PhpWordTests/Style/AbstractStyleTest.php
4438
-
4539
message: '#Parameter \#1 \$objectOrClass of class ReflectionClass constructor expects class-string<object>\|object, class-string\|false given.#'
4640
path: tests/PhpWordTests/Style/AbstractStyleTest.php
47-
-
48-
message: '#PHPDoc tag @var with type PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart is not subtype of native type #'
49-
path: tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php

0 commit comments

Comments
 (0)