phpvms/phpstan.neon
Nabeel Shahzad 235cdb13f3 refactor(airport): delete AirportRepository
- Frontend/AirportController: drop airportRepo, use
  Airport::with('files')->find($id) ($id was already uppercased
  earlier in the method)
- Frontend/PirepController: drop airportRepo from constructor
  (only reference was a commented-out selectBoxList call). Phase
  2 precedent (Aircraft was the same case).
- Filament/Actions/ExportAction: AIRPORT case uses Airport::all()
- Delete app/Repositories/AirportRepository.php (dead selectBoxList
  goes with it)
- phpstan.neon: suppress larastan.relationExistence for
  FilesTrait::files() across Aircraft/Airline/Airport/Subfleet.
  The morphMany is trait-defined and works at runtime, but
  larastan can't statically resolve trait-declared polymorphic
  relations. First direct Eloquent with('files') call lands in
  this commit, hence the new suppression.

Final commit of Phase 3. AirportRepository is gone; 9 repositories
remain (was 10 at branch start). First Query class
(AirportSearchQuery) and search Form Request (SearchAirportsRequest)
are now in production, ready to be reused by Phases 4/6/7.
2026-04-25 12:57:38 -05:00

30 lines
1.1 KiB
Plaintext

includes:
- vendor/larastan/larastan/extension.neon
- vendor/nesbot/carbon/extension.neon
parameters:
paths:
- app/
# Level 10 is the highest level
level: 5
ignoreErrors:
# PHPStan is not able to understand the pivot attributes at the moment
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Relations\\Pivot::\$[a-zA-Z]+#'
# Eloquent Builder methods are not documented on repositories
- '#Call to an undefined method App\\Repositories\\[a-zA-Z]+Repository::[a-zA-Z]+\(\)#'
# FilesTrait::files() defines a morphMany via traits — larastan's relationExistence
# rule can't statically resolve trait-defined polymorphic relations even though they
# work at runtime. Models using FilesTrait: Aircraft, Airline, Airport, Subfleet.
- identifier: larastan.relationExistence
message: '#Relation ''files'' is not found in App\\Models\\(Aircraft|Airline|Airport|Subfleet) model\.#'
# - '#PHPDoc tag @var#'
#
# excludePaths:
# - ./*/*/FileToBeExcluded.php