Skip to content

Commit 0dad6aa

Browse files
committed
Add visitor
1 parent 0e6c6da commit 0dad6aa

File tree

4 files changed

+1091
-2
lines changed

4 files changed

+1091
-2
lines changed

composer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0"
1414
},
1515
"require-dev": {
16-
"php": "~7.1",
17-
"php-stubs/generator": "^0.8"
16+
"php": "~7.1 || ^8.0",
17+
"php-stubs/generator": "^0.8",
18+
"phpdocumentor/reflection-docblock": "^5.3"
1819
},
1920
"suggest": {
2021
"symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",

functionMap.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
/**
4+
* This array is in the same format as the function map array in PHPStan:
5+
*
6+
* '<function_name>' => ['<return_type>', '<arg_name>'=>'<arg_type>']
7+
*
8+
* @link https://github.com/phpstan/phpstan-src/blob/1.5.x/resources/functionMap.php
9+
*/
10+
return [
11+
'have_rows' => ['bool', '@phpstan-impure' => ''],
12+
];

generate.sh

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fi
1616

1717
"$(dirname "$0")/vendor/bin/generate-stubs" \
1818
--force \
19+
--visitor=visitor.php \
1920
--finder=finder.php \
2021
--header="$HEADER" \
2122
--functions \

0 commit comments

Comments
 (0)