Add Laravel Pint configuration for Shift compatibility #564

Merged
Copilot merged 4 commits from copilot/add-code-styling-setup into main 2026-01-29 05:16:17 +00:00
3 changed files with 32 additions and 0 deletions

View File

@@ -49,6 +49,24 @@ We would like to extend our thanks to the following sponsors for funding Laravel
- **[byte5](https://byte5.de)** - **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)** - **[OP.GG](https://op.gg)**
## Code Style
This project uses [Laravel Pint](https://laravel.com/docs/pint) for code styling. Pint is an opinionated PHP code style fixer for minimalists, built on top of PHP-CS-Fixer.
To automatically fix code style issues, run:
```bash
composer pint
```
To check for code style issues without fixing them:
```bash
composer pint-test
```
The code style configuration can be found in `pint.json`.
## Contributing ## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

View File

@@ -52,6 +52,12 @@
"@php artisan key:generate --ansi", "@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi" "@php artisan migrate --graceful --ansi"
],
"pint": [
"./vendor/bin/pint"
],
"pint-test": [
"./vendor/bin/pint --test"
] ]
}, },
"extra": { "extra": {

8
pint.json Normal file
View File

@@ -0,0 +1,8 @@
{
"preset": "laravel",
"rules": {
"simplified_null_return": true,
"new_with_braces": true,
"no_unused_imports": true
}
}