Skip to content

Specify the cron array return type - #470

Merged
szepeviktor merged 1 commit into
php-stubs:masterfrom
oiahoon:fix/add-cron-array-return-type
Jul 12, 2026
Merged

Specify the cron array return type#470
szepeviktor merged 1 commit into
php-stubs:masterfrom
oiahoon:fix/add-cron-array-return-type

Conversation

@oiahoon

@oiahoon oiahoon commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a PHPStan return-type override for _get_cron_array()
  • regenerate the matching WordPress stub annotation
  • add a focused type-inference regression test for the nested cron event shape

Fixes #269.

Testing

  • php -d memory_limit=-1 vendor/bin/phpunit --filter 'get-cron-array\.php' --testdox
  • full PHPUnit suite: 1,442 tests, 1,612 assertions
  • full PHPStan analysis in serial debug mode
  • PHPCS
  • stub generation and PHP syntax checks
  • git diff --check

@szepeviktor

Copy link
Copy Markdown
Member

This is a nice PR.
Thank you.

@szepeviktor
szepeviktor merged commit 04ebb2e into php-stubs:master Jul 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set return type of _get_cron_array

2 participants