![]() ![]() To automate the code formatting process, we're going to set up a build process in a sublime text, so whenever you need to format your code instead of running the long command, you could just press the button on a keyword to fix it. Php-cs-fixer fix /path/project refer to the official doc to discover all the available rules and commands you could use for your formatting. Below, I have an example for you if you want to try to format your files manually. ![]() It is always a tedious job when you go and fix the formatting on each file you have in your project. Ahora, cada vez que queramos buscar un paquete en el repositorio para instalarlo, pulsamos CTRL + SHIFT + P y escribimos Install Package.Entonces podremos buscar entre la gran cantidad de paquetes que existen para Sublime Text e instalarlos con un simple click. composer global require friendsofphp/php-cs-fixerĪfter the installation process is completed open your terminal and simply run php-cs-fixer command just to confirm it's installed properly. Installing php-cs-fixer via composer to run globally on your machine. The team at symfony and the contributors have done really great job building a package that can be used with sublime text to format coding standard. If an error occurs while loading the bs4 formatter, the regexp formatter will automatically be. I personally use sublime as my primary code editor all the time, the main reason is its lightness and popularity among the developers around the world, another beneficial part is the huge availability of open-source packages for it.īelow, I'm going to cover how we format our PHP code to PSR-2 coding standard in sublime text.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |