|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<project name="webapp" default="noop"> |
| 2 | +<project name="plates-assets-cache" basedir="."> |
3 | 3 |
|
4 | | - <target name="noop"/> |
5 | | - <property environment="env"/> |
6 | | - |
7 | | - <tstamp> |
8 | | - <format property="now" pattern="yyyy-MM-dd HH:mm:ss" locale="en,UK"/> |
9 | | - <format property="now_num" pattern="yyyyMMddHHmmss" locale="en,UK"/> |
10 | | - <format property="now_file" pattern="yyyy-MM-dd_HHmmss" locale="en,UK"/> |
11 | | - </tstamp> |
12 | | - |
13 | | - <!-- By default, we assume all tools to be on the $PATH --> |
14 | | - <condition property="ext" value=".bat" else=""> |
| 4 | + <condition property="ext" value=".bat"> |
15 | 5 | <os family="windows"/> |
16 | 6 | </condition> |
17 | 7 |
|
18 | | - <target name="phpunit" description="Run unit tests with PHPUnit"> |
19 | | - <exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" |
20 | | - failonerror="true" taskname="phpunit"> |
| 8 | + <target name="phpunit" description="Run PHPUnit"> |
| 9 | + <exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" failonerror="true" taskname="phpunit"> |
21 | 10 | <arg value="--configuration"/> |
22 | 11 | <arg path="${basedir}/phpunit.xml"/> |
23 | 12 | </exec> |
24 | 13 | </target> |
25 | 14 |
|
26 | | - <target name="phpunit-coverage" description="Run unit tests with PHPUnit with coverage"> |
| 15 | + <target name="phpunit-coverage" description="Run PHPUnit with coverage"> |
27 | 16 | <delete dir="${basedir}/build/coverage"/> |
28 | 17 | <mkdir dir="${basedir}/build/coverage"/> |
29 | | - <exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" |
30 | | - failonerror="true" taskname="phpunit-coverage"> |
| 18 | + <exec executable="${basedir}/vendor/bin/phpunit${ext}" searchpath="true" resolveexecutable="true" failonerror="true" taskname="phpunit-coverage"> |
31 | 19 | <arg value="--configuration"/> |
32 | 20 | <arg path="${basedir}/phpunit.xml"/> |
33 | 21 | <arg value="--coverage-clover"/> |
|
37 | 25 | </exec> |
38 | 26 | </target> |
39 | 27 |
|
40 | | - <target name="phpstan" description="PHP Static Analysis Tool - discover bugs in your code without running it"> |
41 | | - <mkdir dir="${basedir}/build"/> |
42 | | - <get src="https://github.com/phpstan/phpstan/releases/download/0.9/phpstan.phar" |
43 | | - dest="${basedir}/build/phpstan.phar" skipexisting="true"/> |
44 | | - <exec executable="php" searchpath="true" resolveexecutable="true"> |
45 | | - <arg value="${basedir}/build/phpstan.phar"/> |
46 | | - <arg value="analyse"/> |
47 | | - <arg value="-l"/> |
48 | | - <arg value="5"/> |
49 | | - <arg value="-c"/> |
50 | | - <arg path="${basedir}/phpstan.neon"/> |
51 | | - <arg value="src"/> |
52 | | - <arg value="tests"/> |
53 | | - <arg value="--no-interaction"/> |
54 | | - <arg value="--no-progress"/> |
55 | | - </exec> |
56 | | - </target> |
57 | | - |
58 | 28 | <target name="fix-style" description="Code style fixer"> |
59 | 29 | <mkdir dir="${basedir}/build"/> |
60 | | - <get src="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.0.0/php-cs-fixer.phar" |
61 | | - dest="${basedir}/build/php-cs-fixer.phar" skipexisting="true"/> |
| 30 | + <get src="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.10.2/php-cs-fixer.phar" dest="${basedir}/build/php-cs-fixer.phar" skipexisting="true"/> |
62 | 31 | <exec executable="php" searchpath="true" resolveexecutable="true"> |
63 | 32 | <arg value="${basedir}/build/php-cs-fixer.phar"/> |
64 | 33 | <arg value="fix"/> |
65 | | - <arg value="${basedir}/src/"/> |
66 | 34 | <arg value="--rules=@PSR2"/> |
67 | 35 | <arg value="--using-cache=no"/> |
| 36 | + <arg path="${basedir}/src"/> |
68 | 37 | </exec> |
69 | 38 | <exec executable="php" searchpath="true" resolveexecutable="true"> |
70 | 39 | <arg value="${basedir}/build/php-cs-fixer.phar"/> |
71 | 40 | <arg value="fix"/> |
72 | | - <arg value="${basedir}/tests/"/> |
73 | 41 | <arg value="--rules=@PSR2"/> |
74 | 42 | <arg value="--using-cache=no"/> |
| 43 | + <arg path="${basedir}/tests"/> |
75 | 44 | </exec> |
76 | 45 | </target> |
77 | 46 |
|
| 47 | + <target name="phpstan" description="PHP Static Analysis Tool - discover bugs in your code without running it"> |
| 48 | + <mkdir dir="${basedir}/build"/> |
| 49 | + <get src="https://github.com/phpstan/phpstan/releases/download/0.9.2/phpstan.phar" |
| 50 | + dest="${basedir}/build/phpstan.phar" skipexisting="true"/> |
| 51 | + <exec executable="php" searchpath="true" resolveexecutable="true" failonerror="true"> |
| 52 | + <arg value="${basedir}/build/phpstan.phar"/> |
| 53 | + <arg value="analyse"/> |
| 54 | + <arg value="-l"/> |
| 55 | + <arg value="5"/> |
| 56 | + <arg value="-c"/> |
| 57 | + <arg path="${basedir}/phpstan.neon"/> |
| 58 | + <arg value="src"/> |
| 59 | + <arg value="tests"/> |
| 60 | + <arg value="--no-interaction"/> |
| 61 | + <arg value="--no-progress"/> |
| 62 | + </exec> |
| 63 | + </target> |
78 | 64 | </project> |
0 commit comments