Skip to content

Conversation

@Boy132
Copy link
Member

@Boy132 Boy132 commented Jan 1, 2026

Summary by CodeRabbit

  • Chores
    • Consolidated CI linting into a single workflow for consistent checks and added a new static-analysis job.
    • Removed the legacy Pint workflow.
    • Added static analysis configuration to improve code validation.
    • Cleaned up internal annotations and lint suppression comments across various modules to streamline tooling feedback.

✏️ Tip: You can customize this high-level summary in your review settings.

@Boy132 Boy132 self-assigned this Jan 1, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

Consolidates CI linting into a new GitHub Actions workflow and adds PHPStan configuration; additionally adjusts several files to add/remove PHPStan suppression comments and reorders an HTTP POST call in one action. No runtime API or public signatures changed.

Changes

Cohort / File(s) Summary
GitHub Actions workflows
.github/workflows/lint.yml, .github/workflows/pint.yml
Added a unified lint.yml (Pint + PHPStan jobs on PHP 8.4); removed the standalone pint.yml.
Static analysis config
phpstan.neon
New PHPStan configuration (includes Larastan, level 6, paths and ignoreErrors entries).
Billing models & widgets
billing/src/.../ProductWidget.php, billing/src/.../Coupon.php, billing/src/.../Order.php, billing/src/.../Product.php, billing/src/.../ProductPrice.php
Removed or added inline PHPStan suppression comments around service/StripeClient usage; no functional changes.
Pastefox upload action
pastefox-share/src/Filament/Components/Actions/UploadLogsAction.php
Moved the HTTP post() call to occur after ->throw() in the request chain (reordered call within fluent chain).
Player-counter changes
player-counter/database/Seeders/PlayerCounterSeeder.php, player-counter/src/Filament/Server/Pages/PlayersPage.php, player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php
Added PHPStan ignore annotations around command/info block and around gameQuery property/method accesses; no runtime changes.
Subdomains code
subdomains/src/Filament/Server/Resources/Subdomains/SubdomainResource.php, subdomains/src/Models/CloudflareDomain.php, subdomains/src/Models/Subdomain.php
Inserted PHPStan ignore directives before Cloudflare HTTP calls and property access; no control-flow changes.
User-creatable servers
user-creatable-servers/src/Filament/Server/Pages/ServerResourcePage.php, user-creatable-servers/src/Models/UserResourceLimits.php
Removed inline PHPStan ignore comments around app(...) service resolutions; behavior unchanged.
Miscellaneous
billing/... (others already grouped), other small comment-only edits
Mostly static-analysis comment additions/removals; no public API or logic changes beyond the UploadLogsAction reorder.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Add pint workflow #49: Related to Pint CI workflow changes; that PR added a standalone Pint workflow which this change consolidates into lint.yml.

Poem

🐰 I hopped through YAML and neon light,

Moved comments, fixed a POST just right,
Pint and Stan now waltz as one,
Static hush — the rabbits run,
Code carrots tidy, CI bright 🌿

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.85% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a PHPStan workflow job to the CI pipeline via .github/workflows/lint.yml, though it omits that Pint was consolidated into the same workflow.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
.github/workflows/lint.yml (1)

29-29: Consider managing dependency versions more maintainably.

The workflow specifies exact version constraints for all dependencies. While this ensures reproducibility, it requires manual updates when new versions are released. Consider:

  1. Using broader version ranges (e.g., ^1.0 instead of ^1.15.3)
  2. Maintaining these versions in a separate configuration file or repository variable
  3. Using Dependabot to automatically update dependency versions

This approach reduces maintenance overhead while still ensuring compatible versions are used.

Also applies to: 52-52, 55-55, 58-58

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73126f5 and d047c32.

📒 Files selected for processing (3)
  • .github/workflows/lint.yml
  • .github/workflows/pint.yml
  • phpstan.neon
💤 Files with no reviewable changes (1)
  • .github/workflows/pint.yml
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/lint.yml

16-16: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


39-39: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (4)
.github/workflows/lint.yml (3)

1-8: Well-structured workflow with appropriate triggers.

The workflow is cleanly organized with two independent jobs (Pint and PHPStan) that can run in parallel. The trigger configuration for pushes to main and pull requests is appropriate for continuous integration.

Also applies to: 10-12, 34-36


26-26: The workflow's use of composer init --no-interaction is appropriate. Since the repository has no committed composer.json file, the init command creates a minimal configuration needed for the CI jobs to install and run PHP linting tools (Laravel Pint and Phpstan). This is a standard pattern for isolated linting environments and does not overwrite any existing project configuration.


21-21: No action required — PHP 8.4 is well-supported for your CI environment.

PHP 8.4 is available in shivammathur/setup-php@v2 (since v2.32.0), and all stated dependencies explicitly support it: Laravel 12 supports PHP 8.2–8.4, Larastan 3 requires PHP 8.2+, and Filament 4 requires PHP 8.2+. No compatibility concerns with your specified dependency versions.

phpstan.neon (1)

1-2: No issues identified. The phpstan.neon configuration correctly includes the Larastan extension, and Larastan 3.4 is a stable version with no breaking changes. The configuration is compatible and properly set up.

@Boy132 Boy132 marked this pull request as draft January 1, 2026 02:47
@pelican-dev pelican-dev deleted a comment from coderabbitai bot Jan 1, 2026
@pelican-dev pelican-dev deleted a comment from coderabbitai bot Jan 1, 2026
@pelican-dev pelican-dev deleted a comment from coderabbitai bot Jan 1, 2026
@Boy132 Boy132 marked this pull request as ready for review January 1, 2026 15:56
@Boy132
Copy link
Member Author

Boy132 commented Jan 1, 2026

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
player-counter/src/Filament/Server/Pages/PlayersPage.php (2)

43-43: Consider documenting the relationship instead of suppressing the warning.

While the suppression silences PHPStan, it reduces static analysis effectiveness. A better approach would be to add proper PHPDoc annotations to the Egg model to document the gameQuery relationship:

/**
 * @return \Illuminate\Database\Eloquent\Relations\HasOne<GameQuery>
 */
public function gameQuery()

Alternatively, if you're using larastan, ensure it's properly configured to detect Laravel relationships automatically.


75-75: Consider documenting the relationship property instead of suppressing warnings.

Similar to the method access on line 43, these property suppressions can be avoided by adding a @property annotation to the Egg model:

/**
 * @property-read GameQuery|null $gameQuery
 */
class Egg extends Model

This allows PHPStan to understand the property access pattern without needing inline suppressions, improving type safety and static analysis coverage.

Also applies to: 108-108

subdomains/src/Models/CloudflareDomain.php (1)

37-40: PHPStan suppression is appropriate for the Laravel HTTP facade macro.

The Http::cloudflare() macro is properly registered in SubdomainsPluginProvider::boot() and the @phpstan-ignore staticMethod.notFound directive correctly suppresses the static analysis error, since PHPStan cannot detect dynamically registered macros.

For future improvements, consider adding PHPStan stubs to configure this macro in the type system. While the current approach works, stubs would eliminate the need for inline suppressions and improve IDE support. The project's phpstan.neon can be extended with a stubs path when stubs are created.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d047c32 and b1c97c0.

📒 Files selected for processing (17)
  • .github/workflows/lint.yml
  • .github/workflows/pint.yml
  • billing/src/Filament/App/Widgets/ProductWidget.php
  • billing/src/Models/Coupon.php
  • billing/src/Models/Order.php
  • billing/src/Models/Product.php
  • billing/src/Models/ProductPrice.php
  • pastefox-share/src/Filament/Components/Actions/UploadLogsAction.php
  • phpstan.neon
  • player-counter/database/Seeders/PlayerCounterSeeder.php
  • player-counter/src/Filament/Server/Pages/PlayersPage.php
  • player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php
  • subdomains/src/Filament/Server/Resources/Subdomains/SubdomainResource.php
  • subdomains/src/Models/CloudflareDomain.php
  • subdomains/src/Models/Subdomain.php
  • user-creatable-servers/src/Filament/Server/Pages/ServerResourcePage.php
  • user-creatable-servers/src/Models/UserResourceLimits.php
💤 Files with no reviewable changes (1)
  • .github/workflows/pint.yml
✅ Files skipped from review due to trivial changes (5)
  • billing/src/Models/ProductPrice.php
  • subdomains/src/Filament/Server/Resources/Subdomains/SubdomainResource.php
  • billing/src/Models/Product.php
  • player-counter/src/Filament/Server/Widgets/ServerPlayerWidget.php
  • billing/src/Models/Coupon.php
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/lint.yml
  • phpstan.neon
🔇 Additional comments (8)
player-counter/database/Seeders/PlayerCounterSeeder.php (1)

35-38: Appropriate suppression for Laravel seeder pattern.

The PHPStan ignore directive correctly addresses a false positive. The $this->command property is nullable in Laravel seeders (only set when run via CLI), so the defensive check on line 36 is necessary to prevent null pointer exceptions.

pastefox-share/src/Filament/Components/Actions/UploadLogsAction.php (1)

76-81: LGTM! Improved method chain ordering.

The reordering of ->post() to occur after ->throw() is correct and follows Laravel HTTP client best practices. Configuration methods (timeout, connectTimeout, throw) should precede the request execution method (post), which improves both readability and type safety for static analysis tools like PHPStan.

user-creatable-servers/src/Filament/Server/Pages/ServerResourcePage.php (1)

165-166: LGTM! PHPStan suppression removal is appropriate.

The removal of the PHPStan ignore directive is correct. The @var annotation on line 165 provides sufficient type information for static analysis to understand that app(DaemonServerRepository::class) returns a DaemonServerRepository instance.

subdomains/src/Models/Subdomain.php (1)

71-79: PHPStan suppressions applied consistently across all Cloudflare operations.

The PHPStan ignore directives are appropriately applied to all three Cloudflare HTTP operations (POST, PATCH, DELETE), ensuring consistent handling of the Http::cloudflare() macro across the codebase.

As noted in the previous file, consider using PHPStan configuration or stubs for a more maintainable approach in the future.

Also applies to: 98-106, 113-114

user-creatable-servers/src/Models/UserResourceLimits.php (1)

150-151: The @var annotation provides sufficient type information for static analysis.

The @var ServerCreationService $service type hint on line 150 is properly formatted, and ServerCreationService is correctly imported at the top of the file (line 9). The removal of the PHPStan suppression comment aligns with standard Laravel patterns, where the app() helper with a class string argument is understood by LaraSTan to return the specified type.

billing/src/Models/Order.php (2)

231-231: Consistent service resolution pattern.

The removal of the PHPStan suppression here is consistent with the other service container resolution patterns in this file. PHPStan should be able to infer the return type from the handle() method signature.


78-78: Good cleanup of PHPStan suppressions.

Removing these suppressions confirms that PHPStan is properly configured via Larastan to understand Laravel's service container resolution patterns. The explicit @var docblocks on lines 101 and 114 provide adequate type information for the StripeClient instances, and Larastan handles the remaining app() calls correctly.

billing/src/Filament/App/Widgets/ProductWidget.php (1)

25-25: Verify the necessity of this PHPStan suppression.

The property $view is explicitly initialized with a string value, and this is the only occurrence of a property.defaultValue suppression in the codebase. Since Larastan is configured to handle Laravel/Filament patterns, consider whether this suppression masks a false positive that could be better resolved through PHPStan configuration or a Filament-specific extension rather than a blanket ignore comment.

@Boy132 Boy132 merged commit c2ca0f6 into main Jan 1, 2026
4 checks passed
@Boy132 Boy132 deleted the phpstan-workflow branch January 1, 2026 16:01
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.

2 participants