phpstan-fixer

Resolve PHPStan errors with type annotations, PHPDocs, and code improvements.

66|10|Updated Aug 12, 2018
One-click install
npx skills add https://github.com/RaiderIO/keystone.guru --skill phpstan-fixer-raiderio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phpstan-fixer
Source: https://github.com/RaiderIO/keystone.guru/tree/main/.ai/skills/phpstan-fixer
Command: npx skills add https://github.com/RaiderIO/keystone.guru --skill phpstan-fixer-raiderio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phpstan, and includes scripts (resource) components.

What problem does it solve?

This Skill addresses the frustration of PHPStan errors by providing clear, respectful solutions, ensuring code quality without suppressing issues.

Core Features & Use Cases

  • Error Resolution: Offers step-by-step guidance to fix PHPStan errors by adding type annotations, PHPDocs, and code improvements.
  • Project Understanding: Helps identify the project type (Laravel, Symfony, PHP) and relevant PHPStan configurations.
  • Fix Verification: Ensures that errors are resolved by re-running PHPStan after fixes are applied.
  • Use Cases: Suitable for developers who encounter type mismatches, missing type hints, or static analysis failures in their PHP projects.

Quick Start

Apply fixes to a PHPStan error in your project by executing the provided instructions for the specific error identifier.

Frequently Asked Questions about phpstan-fixer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix PHPStan errors for missing type hints and return type mismatches?

To fix PHPStan errors for missing type hints and return type mismatches, you apply precise type annotations, update PHPDocs, and implement code improvements to resolve the specific error identifiers without suppressing the underlying issues.

What is the best way to resolve static analysis failures in Laravel and Symfony projects?

The best way to resolve static analysis failures in Laravel and Symfony projects is to identify the project type and relevant PHPStan configurations, then apply targeted type annotations and code improvements to clear the errors.

Does this PHPStan error resolution approach work for general PHP projects or only specific frameworks?

This PHPStan error resolution approach works for general PHP projects, as well as Laravel and Symfony frameworks, by adapting to the specific project configurations and resolving common static analysis error identifiers accordingly.

Do I need PHPStan installed to use this error fixing Skill?

Yes, you need PHPStan installed to use this error fixing Skill, because it requires knowledge of your project configurations and verifies that errors are resolved by re-running PHPStan after fixes are applied.

How does this approach ensure static analysis errors are actually fixed and not suppressed?

This approach ensures static analysis errors are fixed rather than suppressed by providing clear, respectful solutions through type annotations and code improvements, and then verifying the resolution by re-running PHPStan after the fixes are applied.