Download the PHP package mreduar/laravel-phpcs without Composer

On this page you can find all versions of the php package mreduar/laravel-phpcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-phpcs

PHP Codesniffer ruleset to follow Laravel's coding style

php codesniffer ruleset for laravel or any other php projects.

Installation

*[]** Install using composer

*[]** Install manually

  1. Copy the phpcs.xml file into your project root.
  2. Descoment lines <file>app</file> and the others in phpcs.xml file.
  3. Because this package uses third party standards that are not in phpcs you need to install these package.
    1. composer require slevomat/coding-standard
  4. Run phpcs . to check your project.

Usage

Enabling the rules

Only neccesary if you installed as a package using composer!

php artisan vendor:publish --provider="Mreduar\LaravelPhpcs\LaravelPhpcsServiceProvider" --tag="ruleset"

This will publish to your root directory the following file

Optionally you can also publish a git hook that will help you to never overlook smelly code.

php artisan vendor:publish --provider="Mreduar\LaravelPhpcs\LaravelPhpcsServiceProvider" --tag="hook"

The file will be published in its root directory .git/hooks/pre-commit So every time you try to commit phpcs will first check that you have everything correct.

if you have any errors the commit will be cancelled.

Sniffing code

Use php CodeSniffer commands, pointed towards your xml file, to sniff the code using the new ruleset.

vendor/bin/phpcs vendor/bin/phpcbf

Sniffing code in PHPStorm

See PHP Code Sniffer in PhpStorm on how to set up CodeSniffer in PHPStorm.

Sniffing code Visual Studio Code

See PHP Sniffer by wongjn or other phpcs plugins for more information about PHP Code Sniffer in Visual Studio Code.


Contributing

All changes that makes the sniffer more accurate towards Laravel's coding standard is always highly appreciated and welcome.

Please see CONTRIBUTING for more details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-phpcs with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
slevomat/coding-standard Version ^8.0
squizlabs/php_codesniffer Version ^3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mreduar/laravel-phpcs contains the following files

Loading the files please wait ....