Skip to content

Commit

Permalink
Fix: Function wxr_cdata not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Oct 3, 2024
1 parent df75ff9 commit 8b82f0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ phpcs.xml.dist
phpcs.ruleset.xml
phpstan.neon
phpstan.neon.dist
phpstan.stubs
phpunit.xml
phpunit.xml.dist
playwright.config.js
Expand Down
5 changes: 3 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ includes:
- phar://phpstan.phar/conf/bleedingEdge.neon

parameters:
# bootstrapFiles:
bootstrapFiles:
# Constants, functions, etc. used by GatherPress
- phpstan.stubs
# - vendor/pmc/unit-test/src/classes/autoloader.php
# - vendor/autoload.php
# - gatherpress.php

parallel:
maximumNumberOfProcesses: 1
processTimeout: 300.0
Expand Down
17 changes: 17 additions & 0 deletions phpstan.stubs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Constants, functions, etc. used by GatherPress
* should be understood by PHPStan.
*/

namespace {
/**
* Used in includes/core/classes/class-export.php
*
* @see https://github.com/szepeviktor/phpstan-wordpress/issues/241
*
* @param string $str String to wrap in XML CDATA tag.
* @return string
*/
function wxr_cdata( string $str ): string {}
}

0 comments on commit 8b82f0f

Please sign in to comment.