File tree Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,14 @@ jobs:
2626 - travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress
2727 # Install Nette Coding Standard
2828 - travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress
29+ # Install PHPStan
30+ - travis_retry composer create-project phpstan/phpstan-shim temp/phpstan --no-progress
31+ - travis_retry composer install --no-progress --prefer-dist
2932
3033 script :
3134 - php temp/code-checker/src/code-checker.php --short-arrays --strict-types -i tests/Utils/fixtures.reflection
3235 - php temp/coding-standard/ecs check src tests --config tests/coding-standard.neon
36+ - php temp/phpstan/phpstan.phar analyse --autoload-file vendor/autoload.php --level 7 --configuration tests/phpstan.neon src
3337
3438
3539 - stage : Code Coverage
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ final public function getHtml(): string
311311
312312 /**
313313 * Sets element's textual content.
314- * @param IHtmlString|string $text
314+ * @param IHtmlString|string|int|float $text
315315 * @return static
316316 */
317317 final public function setText ($ text )
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ test(function () {
5858
5959
6060test (function () {
61- $ el = Html::el ('img ' )->src ('image.gif ' )->alt ('' )->setText (null )-> setText ( 'any content ' );
61+ $ el = Html::el ('img ' )->src ('image.gif ' )->alt ('' )->setText ('any content ' );
6262 Assert::same ('<img src="image.gif" alt="" /> ' , (string ) $ el );
6363 Assert::same ('<img src="image.gif" alt="" /> ' , $ el ->startTag ());
6464 Assert::same ('' , $ el ->endTag ());
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ if (!function_exists ('imagewebp ' )) {
6+ function imagewebp ($ image , $ to = null , int $ quality = 80 ): bool
7+ {
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ parameters :
2+ bootstrap : tests/phpstan-bootstrap.php
3+
4+ ignoreErrors :
5+ # PHPStan does not support dynamic by reference return used by Nette\Utils\Strings::pcre()
6+ - ' #Undefined variable : \$m #'
7+
8+ # PHPStan does not support RecursiveIteratorIterator proxying unknown method calls to inner iterator
9+ - '#RecursiveIteratorIterator::getSubPathName\ (\)#'
10+
11+ # PHPStan does not support comparing null
12+ - '#Nette\\Utils\\Strings::substring\ (\ ) expects int , int\|null given #'
You can’t perform that action at this time.
0 commit comments