diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..24d11df --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.php text eol=lf diff --git a/bin/php-code-validator.bat b/bin/php-code-validator.bat new file mode 100644 index 0000000..a9b4b3c --- /dev/null +++ b/bin/php-code-validator.bat @@ -0,0 +1,16 @@ +@echo off +setlocal DISABLEDELAYEDEXPANSION + +SET BIN_DIR=%~dp0 + +if exist "%BIN_DIR%\phpcs.bat" ( + REM used within project + SET "SCRIPT_DIR=%BIN_DIR%\..\flyeralarm\php-code-validator" + SET "COMPOSER_BIN=%BIN_DIR%" +) else ( + REM standalone + SET "SCRIPT_DIR=%BIN_DIR%\.." + SET "COMPOSER_BIN=%BIN_DIR%\..\vendor\bin" +) + +%COMPOSER_BIN%/phpcs.bat -w -p -s --standard=%SCRIPT_DIR%\ruleset.xml %*