Download the PHP package worksome/code-sniffer without Composer
On this page you can find all versions of the php package worksome/code-sniffer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download worksome/code-sniffer
More information about worksome/code-sniffer
Files in worksome/code-sniffer
Package code-sniffer
Short Description Worksome's preferences and custom sniffers for phpcs
License MIT
Informations about the package code-sniffer
:warning: Deprecated in favor of coding-style package :warning:
Worksome's custom sniffs
This package contains all of Worksome's custom sniffs and configuration.
Usage
Create a phpcs.xml
in the root of your project with content like the following
Run phpcs for seeing if you have any errors
Or run phpcbf for automatically fixing the errors when possible
We suggest adding the commands as scripts in your composer.json
for easier execution.
This way you can now execute them via composer
Custom sniffs
List all the custom sniffs created by Worksome.
Laravel
All custom sniffs specific to Laravel.
Config filename kebab case
Checks if all config files are written in kebab case.
Disallow env usage
Makes sure that you don't use env
helper in your code, except for config files.
Event listener suffix
Enforces event listeners to end with a specific suffix, this suffix is defaulted to Listener
.
parameters | defaults |
---|---|
suffix | Listener |
Disallow blade outside of the resources
directory
Makes sure no .blade.php
files exist outside of Laravel's resources
directory.
parameters | defaults |
---|---|
resourcesDirectory | {YOUR_PROJECT}/resources |
PhpDoc
All custom sniffs which are not specific to Laravel.
Property dollar sign
Makes sure that you always have a dollar sign in your properties defined in phpdoc.
Param tags with no type or comment
This removes all @param
tags which has no specified a type or comment
This is mainly because phpstan requires this before it sees the property as valid.
All versions of code-sniffer with dependencies
squizlabs/php_codesniffer Version ^3.6.1
slevomat/coding-standard Version ^8.5
dealerdirect/phpcodesniffer-composer-installer Version ^0.7.0
thecodingmachine/safe Version ^2.0
illuminate/support Version ^8.78 || ^9.0
illuminate/collections Version ^8.78 || ^9.0
illuminate/contracts Version ^8.78 || ^9.0