Open alberto-bottarini opened 6 years ago
PHP example file:
<?php namespace My\App; class Foo { public function getFoo() { echo 1; } }
PHPCS.XML:
<?xml version="1.0"?> <ruleset name="MyStandard"> <rule ref="PSR2" /> <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses"> <severity>0</severity> </rule> </ruleset>
If I run, using shell phpcs myfile.php I get, correctly:
phpcs myfile.php
12 | ERROR | [x] The closing brace for the class must go on the next line after the body
Running phpcbf app/User.php, will fix my file:
phpcbf app/User.php
FILE FIXED REMAINING --------------------------------------------------------------------------- /home/abottarini/Develop/homestead/quizzy/app/User.php 1 0
The same fix won't do if I run phpcbf inside my Visual Studio, while phpcs extension is underling my error line in red.
PHP example file:
PHPCS.XML:
If I run, using shell
phpcs myfile.php
I get, correctly:Running
phpcbf app/User.php
, will fix my file:The same fix won't do if I run phpcbf inside my Visual Studio, while phpcs extension is underling my error line in red.