Get support for mnapoli/pretty
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
mnapoli/pretty
A single CLI command with sane defaults to simplify CodeSniffer and PHP-CS-Fixer.
PHP CodeSniffer and PHP-CS-Fixer are powerful but using them is not simple. It is not always obvious which tool a project uses and whether there is a configuration file to use or whether you need to provide options to the CLI command.
Now it's easy, simply run:
pretty
Pretty will detect the configuration file that exist in the current directory and will run the correct tool. If no configuration file exist, Pretty will run PHP CodeSniffer with PSR-2 by default.
If errors are found, simply run:
pretty fix
Again, Pretty will run the appropriate tool (php-cs-fixer
or phpcbf
) to fix as many errors as possible in your code.
Installation
If you have already set up a global install of Composer just run:
composer global require mnapoli/pretty
Pretty comes with no dependencies so it should not bring any conflict in Composer.
You can also install it as a local dependency of your project with composer require --dev mnapoli/pretty
. In that case you can start the tool with vendor/bin/pretty
.
You will be able to update to new versions by running:
composer global update mnapoli/pretty
Usage
Running an analysis is as simple as running:
pretty
This command will not change any code. To fix errors reported by this command, simply run:
pretty fix
In case you are running the analyses in CI you might want to run:
pretty ci
This will disable the caching option of PHP-CS-Fixer or CodeSniffer (because the cache will not be kept in CI).
Hosted continuous integration
If you are using pretty
in your daily development workflow you may be interested in PrettyCI.com, the SaaS version of pretty
.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2