Skip to content

Fix PHPDoc annotations and add PostType NAME constant#8

Merged
ocean90 merged 2 commits intorefactorfrom
copilot/sub-pr-7
Feb 3, 2026
Merged

Fix PHPDoc annotations and add PostType NAME constant#8
ocean90 merged 2 commits intorefactorfrom
copilot/sub-pr-7

Conversation

Copy link

Copilot AI commented Feb 3, 2026

Addresses code review feedback by fixing inconsistent PHPDoc annotations and aligning interface constants.

PHPDoc fixes:

  • Removed duplicate @return annotations in PostMeta::type() and TermMeta::type()
  • Corrected @var and @return types for Page::$hook_name and Page::get_hook_name() from string to string|false

Interface consistency:

  • Added NAME constant to PostType interface to match Taxonomy interface pattern
interface PostType {
    /**
     * Post type name.
     *
     * Implementations are expected to override this.
     */
    public const string NAME = '';
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ocean90 <617637+ocean90@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 3, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/johnbillion/args/zipball/ef670a14ce0b9221cee0a39f076f4810a200d1ac
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qtQ1R4 /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/5171cb6650e6c583a96943fd6ea0dfa3e1089a8a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qtQ1R4 /usr/bin/composer install (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/dfaf1f530e1663aa167bc3e52197adb221582629
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qtQ1R4 /usr/bin/composer install (http block)
  • https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/aa722f037b2d034828cd6c55ebe9e5c74961927e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qtQ1R4 /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Remove legacy code and update typings Fix PHPDoc annotations and add PostType NAME constant Feb 3, 2026
Copilot AI requested a review from ocean90 February 3, 2026 15:19
@ocean90 ocean90 marked this pull request as ready for review February 3, 2026 15:21
@ocean90 ocean90 merged commit d7bb20f into refactor Feb 3, 2026
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.

2 participants