✅
Phecks
  • User Guide
    • Getting Started
    • Configuration
    • Command-line interface
    • The Baseline
    • Continuous Integration (CI)
  • About phecks
    • The idea behind it
    • What is a check?
  • Writting checks
    • Making a Check
    • Check Sources
    • Pipes
  • Examples
    • Check inspirations
    • Spatie checks
  • Advanced
    • Making sources
    • Making Pipes
    • Formatters
Powered by GitBook
On this page
  1. Examples

Check inspirations

Ideas for your next Checks.

This page might not be much, but here you can find some inspirations for some custom phecks your team could implement:

📜 Namings

  • Check that classes under a specific folder, or classes that extend a particular parent class, have a specific prefix or suffix.

  • Check that get methods always return something.

  • Check that set methods always return self/void.

✋ Prevent usage of deprecated

  • Prevent classes from extending deprecated classes

  • Prevent classes from importing deprecated classes

✅ Tests

  • Check that test classes use snake_case methods.

  • Check that test classes belong to a @group

  • Check that test classes are under the correct namespace

🧰​ Laravel (frameworks)

  • Check that models are using the Attribute approach for mutators and accessors.

  • Check that migrations are anonymous classes.

  • Check that commands only have the handle method as public.

  • Check that Listeners don't have the same name as the Event (ModelCreatedEvent -> UpdateChildrenListener)

PreviousPipesNextSpatie checks

Last updated 2 years ago

Don't forget to check the with actually working checks.

Spatie example