get_row_index() Return void
isaumya opened this issue · 6 comments
Hello @isaumya!
I've found this function in includes/api/api-template.php
of v5.9.5.
It is totally without PHPDoc.
Are you sure intelephense uses this repo?
Hey @szepeviktor,
Thanks for your reply. Yes I've installed this stub as a dev dependency in my development for intelephense to work.
If you check here: https://www.advancedcustomfields.com/resources/get_row_index/
You will see that it is always supposed to return int
.
This repo brings you ACF PRO stubs. It is fixed a bit: https://github.com/php-stubs/acf-pro-stubs/blob/master/generate.sh#L30-L43
But not edited manually. It would make a release impossible.
BTW ACF PRO has zillion problems with PHPDoc blocks and types.
Please understand.
OK. I understand. It's not a hinderence in the development but I saw the thing so thought I report it. Hopefully for it to get fixed in future.
Also as now ACF been acquired by deliciousbrains, hopefully They will add proper comment/docs in the code?
Also don't you think editing the stubs file like this will help:
function get_row_index() : int {
}
An automatic release takes minutes. A manual one surely takes much longer.
Please consider using sed
or patch
to fix your findings.
🚢 Here you go!
https://github.com/php-stubs/acf-pro-stubs/releases/tag/v5.9.6