Skip to content

Commit 3b542f9

Browse files
committed
Do not run PHPCS on PHP 7.4
1 parent 3b7a499 commit 3b542f9

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

build.xml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,26 @@
3333
</target>
3434

3535
<target name="cs">
36-
<exec
37-
executable="vendor/bin/phpcs"
38-
logoutput="true"
39-
passthru="true"
40-
checkreturn="true"
41-
>
42-
<arg value="--extensions=php"/>
43-
<arg value="--encoding=utf-8"/>
44-
<arg value="--tab-width=4"/>
45-
<arg value="-sp"/>
46-
<arg path="src"/>
47-
<arg path="tests"/>
48-
</exec>
36+
<php expression="PHP_VERSION_ID &gt;= 70400 ?'true':'false'" returnProperty="isPHP74" level="verbose" />
37+
<if>
38+
<equals arg1="${isPHP74}" arg2="false" />
39+
<then>
40+
<exec
41+
executable="vendor/bin/phpcs"
42+
logoutput="true"
43+
passthru="true"
44+
checkreturn="true"
45+
>
46+
<arg value="--colors"/>
47+
<arg value="--extensions=php"/>
48+
<arg value="--encoding=utf-8"/>
49+
<arg value="--tab-width=4"/>
50+
<arg value="-sp"/>
51+
<arg path="src"/>
52+
<arg path="tests"/>
53+
</exec>
54+
</then>
55+
</if>
4956
</target>
5057

5158
<target name="cs-fix">

0 commit comments

Comments
 (0)