Skip to content

Commit acbf473

Browse files
🔧 Add command to use phpcbf
1 parent 4161664 commit acbf473

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ phpunit.bin = ${basedir}/vendor/bin/phpunit
77

88
# PHP Code Sniffer
99
## Paths
10+
phpcbf.bin = ${basedir}/vendor/bin/phpcbf
1011
phpcs.bin = ${basedir}/vendor/bin/phpcs
1112
phpcs.dir = ${basedir}/vendor/squizlabs/php_codesniffer
1213
phpcs.symlink.path = ${basedir}/vendor/squizlabs/php_codesniffer/src/Standards/SymfonyCustom

build.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@
4444
</exec>
4545
</target>
4646

47+
<target name="phpcbf" depends="symlink-cs" description="Find coding standard violations using PHP Code Sniffer">
48+
<exec executable="${phpcbf.bin}" failonerror="true">
49+
<arg value="--standard=SymfonyCustom"/>
50+
<arg value="--extensions=php"/>
51+
<arg value="--ignore=vendor/*"/>
52+
<arg path="${basedir}"/>
53+
</exec>
54+
</target>
55+
4756
<target name="symlink-cs" description="Symlink this coding standard" unless="symlink.exists">
4857
<symlink link="${phpcs.symlink.path}" resource="${basedir}/SymfonyCustom"/>
4958
</target>

0 commit comments

Comments
 (0)