The goal of this guide is to create a unified set of code style rules that all JumpGate packages follow. If you want to use these for your app as well feel free. If you have different guidelines modify this document to suit your needs.
To begin with, we MUST follow PHP’s PSR-1 and PSR-12. These two PHP-FIG standards are always in effect and followed. At times we may add extra details to something that is avoided by these, but if it’s mentioned in them, we will follow. You can add PSR-2 code sniffing to your IDE to make sure you are always consistent.
Now, we will specify some things that we consider important that are not covered by PSR standards.
These are areas in the code where we feel there should be accepted conventions and conformity.
s and some being ies.Announcing your route names should all begin with announcement.default.
admin context your route name should begin with admin.app/Http/Controllers directory MUST NOT have the word Controller in their name.Interface in their name.Here are a few specific rules for controllers.
app/Http/Controllers) directory, it MAY contain the word controller.For consistency the following rules should be observed.
Incentivizing instead of Incentives.Incentive and not IncentiveController.Incentive and not Incentives.