Skip to content

Conversation

@MrPunyapal
Copy link
Contributor

This pull request adds improved PHPDoc type annotations to several Eloquent relationship methods, enhancing static analysis and developer experience. These changes clarify the expected return types for relationships, making the codebase easier to understand and work with.

Relationship method type annotations:

  • Added a detailed return type annotation to the tenant method in the BelongsToTenant trait, specifying the related model and the current class.
  • Added a detailed return type annotation to the domains method in the HasDomains trait, specifying the related model and the current class.
  • Added a detailed return type annotation to the tenants method in the ResourceSyncing class, specifying the related model and the current class.

@MrPunyapal MrPunyapal changed the title Chore: add relation phpdocs for larastan Chore: add relation phpdocs for phpstan/larastan Dec 28, 2025
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.92%. Comparing base (3c0e21b) to head (4fa82d3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1424   +/-   ##
=========================================
  Coverage     85.92%   85.92%           
  Complexity     1147     1147           
=========================================
  Files           184      184           
  Lines          3360     3360           
=========================================
  Hits           2887     2887           
  Misses          473      473           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@calebdw calebdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stancl stancl changed the title Chore: add relation phpdocs for phpstan/larastan [4.x] Add more relation type annotations Dec 28, 2025
@stancl stancl merged commit e3701f1 into archtechx:master Dec 28, 2025
6 checks passed
@stancl
Copy link
Member

stancl commented Dec 28, 2025

Thanks!

@MrPunyapal MrPunyapal deleted the chore/add-relation-docs branch December 29, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants