Skip to content

Standardize local variables to camelCase (Spatie guidelines) across packages #235

Description

@herpaderpaldent

Context

Spatie's PHP/Laravel guidelines (now installed as the spatie-laravel-php skill via spatie/guidelines-skills) require camelCase for methods and variables, while config keys and database columns stay snake_case. The codebase currently uses snake_case local variables throughout. This issue tracks standardizing on camelCase so it isn't forgotten. Prompted during the web ESI / Laravel 13 work (seatplus/web#1489).

Non-compliance by package

Distinct snake_case local variables in src (rough scale, not exact work items):

Package snake_case vars files Repo
esi-schema ~354 167 seatplus/esi-schema
eveapi ~94 103 seatplus/eveapi
web ~102 78 seatplus/web
auth ~71 44 seatplus/auth
esi-client ~31 6 seatplus/esi-client

Approach (per-package PRs — each repo has its own CI / 100% type-coverage / PHPStan)

  • esi-client
  • eveapi
  • auth (security-critical core — extra test care)
  • web
  • esi-schema⚠️ special case, likely EXCLUDE: mostly generated ESI operation/DTO classes whose snake_case mirrors ESI API field names. Rename at the generator (if anywhere), never by hand, and confirm before touching.

Rules / caveats

  • Rename only true local variables (and non-mapped private/protected methods) to camelCase.
  • Keep snake_case for: config keys, DB column names, Eloquent attribute-backed properties, $fillable/$casts entries, and anything that maps to a storage column or an ESI API payload field.
  • Relation method names stay per each package's existing convention — auth uses camelCase (roleMemberships, mainCharacter), eveapi CharacterInfo uses snake_case (wallet_journals, assets). Do not "fix" these.
  • Do each package wholesale, not piecemeal (consistency-first), and validate with that package's full test suite + type-coverage + PHPStan before merging.

Reference: Spatie guidelines — https://spatie.be/guidelines/laravel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions