• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Artisan Command for FriendsOfPHP/PHP-CS_Fixer

Deprecated

This package is deprecated. We encourage you to look at Laravel Pint instead.

Laravel PHP CS Fixer

The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer bug reports and ideas about new features are welcome there.

The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You can also define your (teams) style through configuration.

This package makes it easier than ever to use PHP CS Fixer to maintain your laravel code by providing access to it via tools that you are already familiar with. An artisan command to fix the code, and manage the configuration the way you do all the other laravel packages you use.

Features of this package

  • Run PHP-CS-Fixer commands via Laravel Artisan CLI.
  • Laravel Code Style Configuration Used by Default.
  • No need to learn a new tool.

Versions and compatibility

Note: This documentation was written for Laravel 5.5.

  • PHP Version: "^7.1.3 || ^8.0"
  • Laravel/Lumen: "^5.4|^6.0|^7.0|^8.0"
  • PHP-CS-Fixer: "^3.0.0"

Installation

composer require stechstudio/laravel-php-cs-fixer

Configuration

The default rule configuration is in the fixer.php and is intended to match the rules used by Laravel Shift.

if you want to modify this yourself, just use artisan php artisan vendor:publish --provider="STS\Fixer\FixerServiceProvider" and it will put the default configuration in 'config/fixer.php'. Check the
PHP-CS-Fixer/README for valid rules.

Usage

Fix Your Code

Fix your code with Laravel Coding Standards.

Syntax:

$ php artisan fixer:fix [options]

Example:

Usage:
  fixer:fix [options] [--] [<path>...]

Arguments:
  path                               The path. Can be a list of space separated paths

Options:
      --path-mode=PATH-MODE          Specify path mode (can be override or intersection). [default: "override"]
      --allow-risky=ALLOW-RISKY      Are risky fixers allowed (can be yes or no).
      --config=CONFIG                The path to a .php-cs-fixer.php file.
      --dry-run                      Only shows which files would have been modified.
      --rules=RULES                  The rules.
      --using-cache=USING-CACHE      Does cache should be used (can be yes or no).
      --cache-file=CACHE-FILE        The path to the cache file.
      --diff                         Also produce diff for each file.
      --format=FORMAT                To output results in other formats.
      --stop-on-violation            Stop execution on first violation.
      --show-progress=SHOW-PROGRESS  Type of progress indicator (none, dots).
  -h, --help                         Display help for the given command. When no command is given display help for the list command
  -q, --quiet                        Do not output any message
  -V, --version                      Display this application version
      --ansi                         Force ANSI output
      --no-ansi                      Disable ANSI output
  -n, --no-interaction               Do not ask any interactive question
      --env[=ENV]                    The environment the command should run under
  -v|vv|vvv, --verbose               Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  

More Repositories

1

laravel-zipstream

Easily create Zip files on-the-fly and provide a streaming download
PHP
381
star
2

filament-impersonate

Filament plugin that makes it easy to impersonate your users
PHP
232
star
3

laravel-ssh-tunnel

Easy creation & maintenance of an SSH Tunnel for Laravel/Lumen
PHP
191
star
4

backoff

PHP library providing retry functionality with multiple backoff strategies and jitter support
PHP
187
star
5

laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel
PHP
121
star
6

laravel-env-security

Securely manage Laravel .env files for different deployment environments
PHP
75
star
7

laravel-bref-bridge

Bref, the Laravel way.
PHP
71
star
8

laravel-metrics

Easily track metrics from Laravel events and ship to InfluxDB, Prometheus, CloudWatch, or PostHog.
PHP
46
star
9

libvips-lambda

libvips Executable for AWS Lambda
Shell
46
star
10

aws-lambda-build

Docker Image for building AWS Lambda executables.
Dockerfile
40
star
11

laravel-aws-lambda

⛔️ DEPRECATED: Running Laravel on AWS Lambda
PHP
33
star
12

laravel-visual-testing

Visual UI screenshot testing with Laravel Dusk using percy.io
PHP
32
star
13

php-lambda

Build PHP executables for AWS Lambda
Dockerfile
24
star
14

laravel-record

What if Laravel's Collection and Model classes had a baby?
PHP
22
star
15

laravel-raw-sessions

Laravel session driver to establish bridge with raw PHP $_SESSION
PHP
18
star
16

laravel-hubspot

PHP
17
star
17

bref-extensions

Build tools for compiling binaries and extensions against the bref layer.
Dockerfile
14
star
18

codeception-laravel-unittest

PHP
11
star
19

laravel-vfs-adapter

Virtual Filesystem Storage Adapter for Laravel
PHP
10
star
20

filament-opcache

Manage OPcache from your Filament admin panel.
PHP
7
star
21

laravel-socialite-auth

PHP
6
star
22

filament-phpinfo

View phpinfo from your Filament admin panel.
Blade
4
star
23

phpinfo

Easily interact with your PHP configuration
PHP
4
star
24

laravel-upload-server

PHP
3
star
25

chalice_helpers

Some utilities for AWS Chalice
Python
3
star
26

aws-events

Library to help manage the plethora of event configurations in AWS Lambda
PHP
3
star
27

bai2

PHP library for parsing BAI2 files
PHP
2
star
28

laravel-storage-connect

Laravel package to easily connect to cloud storage accounts and upload files
PHP
2
star
29

insult-service

Random Insults from Martin Luther
JavaScript
1
star
30

laravatar

Minimalist Blade component for displaying a Gravatar, or falling back to initials.
PHP
1
star
31

laravel-locking-migrations

PHP
1
star
32

laravel-email-events

Laravel package to normalize webhooks from email providers like SendGrid or Postmark
PHP
1
star
33

lbb-core

Laravel Vapor Core Lambda Bootstrap for your own Lambda Layer, like bref!
PHP
1
star
34

slack-laravel-api

Laravelized Slack PHP Api
PHP
1
star