Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpcs Tool Laravel Package

hostnet/phpcs-tool

Hostnet PHPCS Tool wraps PHP_CodeSniffer with Hostnet’s coding standard and custom sniffs, making it easy to enforce consistent code style and catch coding-standard issues across PHP projects. It includes a ready-to-use ruleset and simple CLI workflow for local development and CI.

Deep Wiki
Context7

hostnet/phpcs-tool integrates PHP_CodeSniffer with Hostnet’s coding standard, helping teams enforce consistent PHP style across projects. It provides a ready-to-use ruleset and command-line workflow, so the same checks can run locally and in CI without assembling sniff configurations from scratch.

  • Preconfigured Hostnet coding standard
  • Integrates PHP_CodeSniffer dependencies
  • Simple CLI usage for local and CI checks
  • Custom sniffs and rules for Hostnet conventions
  • Easy integration into Composer-based workflows
Frequently asked questions about Phpcs Tool
What is hostnet/phpcs-tool used for?
It is a Composer package that provides a simple command-line wrapper around PHP_CodeSniffer. Use it to tokenise PHP, JavaScript, and CSS files and detect violations of a defined coding standard. In Laravel projects it helps enforce consistent style locally and in CI.
How do I install hostnet/phpcs-tool in a Laravel project?
Install it as a development dependency with Composer, typically using composer require --dev hostnet/phpcs-tool. Because it wraps PHP_CodeSniffer, it is usually run from vendor/bin or through a Composer script. Check the available binary after installation to confirm the exact command.
How do I run PHP_CodeSniffer with hostnet/phpcs-tool?
After installation, invoke the package's CLI wrapper from your project root, often via vendor/bin. Pass the paths you want to check, such as app, routes, and tests, along with your chosen standard or ruleset. Confirm the exact command name and options from the installed binary or package documentation.
Does hostnet/phpcs-tool work with Laravel?
It is not Laravel-specific; it is a wrapper for PHP_CodeSniffer, so it can run in any PHP project. In Laravel you can point it at app, config, routes, tests, and other directories and use a Laravel-friendly ruleset. It works well as a local quality check and as a CI step.
Which Laravel or PHP versions are supported by hostnet/phpcs-tool?
The package is installed via Composer, so compatibility is determined by its composer.json constraints and the PHP_CodeSniffer version it pulls in. Check those constraints against your Laravel project's PHP version before installing. For older Laravel applications, verify that the required PHP version is still supported.
Can I use a custom coding standard or ruleset with hostnet/phpcs-tool?
PHP_CodeSniffer supports custom rulesets via XML files, and a wrapper generally lets you pass a standard or ruleset path. Create a ruleset for your Laravel conventions and reference it in local and CI commands. Confirm the wrapper's exact option for ruleset selection in its documentation.
Can hostnet/phpcs-tool check JavaScript and CSS files?
The underlying PHP_CodeSniffer tool tokenises PHP, JavaScript, and CSS files, so it can detect violations in those file types when configured. In a Laravel project you may still prefer separate JavaScript and CSS linters, but PHPCS can cover basic style checks. Point the command at the relevant directories or file extensions.
How do I integrate hostnet/phpcs-tool into a CI pipeline?
Add the Composer install and the PHPCS wrapper command to your CI pipeline, typically as a dedicated lint or static analysis job. Configure it to fail on violations so pull requests cannot merge with style errors. Cache Composer dependencies if your CI provider supports it.
What is the difference between hostnet/phpcs-tool and squizlabs/php_codesniffer?
squizlabs/php_codesniffer is the underlying PHP_CodeSniffer library and CLI. hostnet/phpcs-tool is a Hostnet wrapper that provides a simpler command-line entry point around it. Use the wrapper if you want the Hostnet workflow; use PHP_CodeSniffer directly if you need its full native CLI surface.
Is hostnet/phpcs-tool maintained, and what should I check before using it in production?
Maintenance activity and release compatibility should be verified on Packagist and the repository before adopting it. Check the latest release date, supported PHP versions, and whether it tracks current PHP_CodeSniffer releases. For production use, pin the version in composer.json and run it in CI so style checks are reproducible.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo