coding-standards

Enforce PSR-12, PHPDoc, and type-hint standards in PHP projects.

2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/masanao-ohba/claude-manifests --skill coding-standards-masanao-ohba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/masanao-ohba/claude-manifests/tree/main/skills/php/coding-standards
Command: npx skills add https://github.com/masanao-ohba/claude-manifests --skill coding-standards-masanao-ohba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHP projects often diverge in coding style and documentation, leading to maintainability challenges and inconsistent code reviews. This Skill defines and enforces PHP coding standards (PSR-12, PHPDoc, and strict type hints) across any PHP project.

Core Features & Use Cases

  • PSR-12 Compliance: Enforces formatting, namespaces, imports, and class structure.
  • PHPDoc Standards: Encourages comprehensive documentation for public APIs.
  • Type Hints: Promotes explicit parameter and return types across methods.
  • Use Case: A PHP project with multiple contributors can automatically check code during development and CI to reduce defects and improve readability.

Quick Start

Apply the PHP coding standards in your project by reviewing the frontmatter rules and using the included lint hooks to verify PHP files. Run a local lint (php -l) on PHP source files and integrate with your CI to enforce standards on pull requests.

Frequently Asked Questions about coding-standards

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

FAQPage Schema
How do I enforce PSR-12 coding standards across a PHP project with multiple contributors?

You can enforce PSR-12 coding standards across a PHP project by applying frontmatter rules and using integrated lint hooks to verify code formatting, namespaces, and class structure during development and CI pipelines.

What is the best way to check PHPDoc and type hint standards during code reviews?

The best way to check PHPDoc and type hint standards during code reviews is by guiding code structure and running static checks to ensure explicit parameter, return types, and comprehensive public API documentation.

Can I use PHP lint checks in my CI pipeline to enforce coding standards?

Yes, you can integrate PHP lint checks in your CI pipeline to enforce coding standards by running php -l on PHP source files to catch style divergences and defects on pull requests.

Does this coding standards enforcement work with any PHP framework?

Yes, this coding standards enforcement works with any PHP framework by defining and applying PSR-12, PHPDoc, and strict type hint rules universally across your project's source files.

Why should I enforce strict type hints and PHPDoc in my PHP projects?

You should enforce strict type hints and PHPDoc in PHP projects to solve maintainability challenges and inconsistent code reviews by promoting comprehensive documentation and explicit parameter and return types.