Skip to content

Commit

Permalink
Merge pull request #10 from juhojama/master
Browse files Browse the repository at this point in the history
Add function mapping
  • Loading branch information
juhojama authored Jan 14, 2024
2 parents 0e6c6da + 0dad6aa commit 6e7705f
Show file tree
Hide file tree
Showing 4 changed files with 1,091 additions and 2 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0"
},
"require-dev": {
"php": "~7.1",
"php-stubs/generator": "^0.8"
"php": "~7.1 || ^8.0",
"php-stubs/generator": "^0.8",
"phpdocumentor/reflection-docblock": "^5.3"
},
"suggest": {
"symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
Expand Down
12 changes: 12 additions & 0 deletions functionMap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

/**
* This array is in the same format as the function map array in PHPStan:
*
* '<function_name>' => ['<return_type>', '<arg_name>'=>'<arg_type>']
*
* @link https://github.com/phpstan/phpstan-src/blob/1.5.x/resources/functionMap.php
*/
return [
'have_rows' => ['bool', '@phpstan-impure' => ''],
];
1 change: 1 addition & 0 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ fi

"$(dirname "$0")/vendor/bin/generate-stubs" \
--force \
--visitor=visitor.php \
--finder=finder.php \
--header="$HEADER" \
--functions \
Expand Down
Loading

0 comments on commit 6e7705f

Please sign in to comment.