Skip to content

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

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

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