mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
29 lines
753 B
YAML
29 lines
753 B
YAML
distributable: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/{{version.tag}}/php-cs-fixer.phar
|
||
|
||
versions:
|
||
github: PHP-CS-Fixer/PHP-CS-Fixer
|
||
|
||
warnings:
|
||
- vendored
|
||
|
||
dependencies:
|
||
php.net: '>=7.4'
|
||
|
||
build:
|
||
- install -D symfony.com∕cs-{{version}}.phar {{prefix}}/libexec/lib/php-cs-fixer.phar
|
||
- run: |
|
||
cat > php-cs-fixer <<EOF
|
||
#!/bin/sh
|
||
exec php \$(dirname \$0)/../libexec/lib/php-cs-fixer.phar "\$@"
|
||
EOF
|
||
chmod +x php-cs-fixer
|
||
working-directory: ${{prefix}}/bin
|
||
|
||
provides:
|
||
- bin/php-cs-fixer
|
||
|
||
test:
|
||
- php-cs-fixer --version | grep {{version}}
|
||
- echo "<?php \$this->foo( 'Hello World!' );" > test.php
|
||
- php-cs-fixer fix test.php
|
||
- cat test.php | grep "\$this->foo('Hello World!');"
|