Commit Graph

17 Commits (a28d3df4c42df5cd169a461f01d5e1596854f059)

Author SHA1 Message Date
Your Name a28d3df4c4 StrictArrayParamDimFetchRector 6 days ago
Your Name d4e7948a2f add type to return 6 days ago
Your Name 0d999f5dda added return type to function 6 days ago
Your Name 0dbd78ca8e Lint 6 days ago
Your Name 5ebc1af91e BATCH 1 6 days ago
Your Name 11d547415e Add HasMany return type to CustomFilter::statuses() for Larastan
Larastan v3.12.0 added the larastan.relationExistence rule, which
detects Eloquent relations by their declared return type. statuses()
defined the hasMany relation but lacked the ': HasMany' return type, so
the rule could not recognize it and flagged $filter->load([...,
'statuses']) in CustomFilterController.php as referencing a missing
relation. Add the return type to match the sibling keywords() method.
Verified with larastan/larastan v3.12.0 (No errors).
1 week ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name c891f34df6 polish 4 weeks ago
Your Name f2159197e8 fix: add return type declarations to Eloquent relation methods
Larastan 3.x requires explicit return types on relation methods to
verify relation existence when using with(), has(), etc. This adds
the appropriate return type declarations to all relation methods
flagged by the larastan.relationExistence rule.

Models fixed:
- Profile (avatar, statuses)
- User (profile)
- Status (profile, media, hashtags)
- DirectMessage (status, author, recipient)
- Report (reporter, status, reportedUser)
- Like (actor, status)
- Media (status)
- Notification (item)
- HashtagFollow (hashtag)
- OauthClient (user)
- Story (profile)
- StatusHashtag (status, hashtag, profile, media)
- AccountInterstitial (user)
- Hashtag (posts)
- CustomFilter (keywords)
- CustomFilterKeyword (customFilter)
- AdminShadowFilter (profile)
- ImportPost (status)
4 weeks ago
Your Name 7c964f3b4f fix: replace backslash-prefixed facade calls with imported references
Replace \Cache::, \Log::, \DB:: calls with their imported facade
equivalents. The backslash-prefix relies on global aliases which
PHPStan cannot resolve, causing class.notFound errors.
4 weeks ago
Your Name e7ba43e2e1 fix: add missing use imports to resolve phpstan class.notFound errors
Add missing imports for Log, Cache, DB, FollowerService, StatusService,
LikeService, ReblogService, UserFilterService, AdminProfile, OauthClient,
and fix StatusTimelineTransformer reference (class didn't exist, replaced
with StatusTransformer).
4 weeks ago
Your Name 2f06f30508 fix 7 months ago
Your Name 45a9a3b472 RemoveUnreachableStatementRector 11 months ago
Daniel Supernault 77044ba193
Update CustomFilter model, add custom limits for max_content_scan_limit, max_filters_per_user, max_keywords_per_filter, max_keyword_length, max_pattern_length, max_reported_matches, max_create_per_hour, max_updates_per_hour so admins have more control over this feature 1 year ago
Daniel Supernault b86102823b
Update CustomFilter model and CustomFilterController 1 year ago
Daniel Supernault 3ff54b9ea6
Updaet CustomFilter model 1 year ago
Daniel Supernault 437d742ac4
Add custom filters
Add custom filters, compatible with Mastodon `/api/v2/filters`

Todo:
- [ ] fix routes
- [ ] finish other context filtering
1 year ago