Skip to content

Move facade PHPDoc blocks to sit directly above the class #331

Closed

Description

@xentixar

The @method docblocks on facade classes are placed before the use import. A class docblock has to sit immediately above the class declaration, with imports above it. As written, the block is detached, so IDEs and static analysis do not attach the @method tags to the class.

src/Phaseolies/Support/Facades/Auth.php is the example. The same order is used across the other files in src/Phaseolies/Support/Facades/.

Current:

namespace Phaseolies\Support\Facades;

/**
 * @method static try(array $credentials = [], bool $remember = false): bool
 * ...
 * @see \Phaseolies\Auth\Security\Authenticate
 */

use Phaseolies\Facade\BaseFacade;

class Auth extends BaseFacade

Expected:

namespace Phaseolies\Support\Facades;

use Phaseolies\Facade\BaseFacade;

/**
 * @method static try(array $credentials = [], bool $remember = false): bool
 * ...
 * @see \Phaseolies\Auth\Security\Authenticate
 */
class Auth extends BaseFacade

Move each facade docblock to directly above its class and leave the use statements above the docblock.

Activity

  1. added theissue type on Sep 24, 2026
  2. added
    bugSomething isn't working
    documentationImprovements or additions to documentation
    on Sep 24, 2026
  3. removed theissue type on Sep 24, 2026
  4. added and removed
    bugSomething isn't working
    on Sep 24, 2026
  5. techmahedy commented on Sep 24, 2026

    @techmahedy
    Member

    @xentixar Thanks for pointing this out. I’ve updated the facade files so that all use statements remain above the class docblocks, and each @method docblock is placed directly above its corresponding class declaration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions