You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a sniff which could check that the name in a namespace declarations complies with certain naming conventions.
The most common naming convention would probably be StudlyCaps/PascalCase, but supporting other naming conventions should also be considered.
Describe the solution you'd like
A new sniff with a choice of which naming convention to enforce.
The naming convention would need to be applied to each part of the namespace declaration.
Some examples:
// StudlyCaps/PascalCase.namespaceVendorName\PackageName\SubCategory\SubLevel; // OK.namespaceVendor_Name\package_name\subCategory\sublevel; // Not OK.// Camel_Caps with underscores.namespaceVendor_Name\Package_Name\Sub_Category\Sub_Level; // OK.namespaceVendorName\package_name\subCategory\sublevel; // Not OK.// snake_case.namespace vendor_name\package_name\sub_category\sub_level; // OK.namespaceVendor_Name\packageName\subCategory\Sublevel; // Not OK.
Additional context (optional)
Might be a good idea for the sniff to also check that each part of the name complies with the following additional conventions:
No leading underscore(s).
No trailing underscore(s).
namespaceVendorName\PackageName\SubCategory\SubLevel; // OK.namespace _VendorName\_PackageName__\SubLevel_; // Not OK.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
It would be nice to have a sniff which could check that the name in a namespace declarations complies with certain naming conventions.
The most common naming convention would probably be StudlyCaps/PascalCase, but supporting other naming conventions should also be considered.
Describe the solution you'd like
A new sniff with a choice of which naming convention to enforce.
The naming convention would need to be applied to each part of the namespace declaration.
Some examples:
Additional context (optional)
Might be a good idea for the sniff to also check that each part of the name complies with the following additional conventions:
The text was updated successfully, but these errors were encountered: