1

On my laravel 9 site I have installed laravel/pint and running command

./vendor/bin/pint  -v

checking modified code I see that there is no any rule like no more 120 symbols in 1 line.

Checking here https://github.com/laravel/pint/blob/main/resources/presets/laravel.php

I did not not find such rule... In my pint.json I set

"preset": "psr12",

How can I add such rule ?

"laravel/framework": "^9.19",
"laravel/pint": "^1.3",

Thanks in advance!

Petro Gromovo
  • 1,755
  • 5
  • 33
  • 91
  • 1
    the `no more than 120 symbols` is not a rule, its a suggestion. sometimes following that rule leads to other more severe issues like naming variables and functions with short names to make it under 120 symbols which is way worse than exceeding that limit. – N69S Jan 08 '23 at 12:28

1 Answers1

2

Laravel pint is built on top of php-cs-fixer which does not, currently, support a rule to enforce a max number of characters.

There has however been created a feature request for this functionality, but since consensus is that it will be hard to implement - it might take a while before we see such a feature.

You can always follow the issue here: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/2790

Nicolas Buch
  • 421
  • 1
  • 4
  • 7