From b6e06a3df064e1d6cda0ad714af4e7444b50faa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Lucas?= Date: Wed, 18 Dec 2024 06:26:47 -0300 Subject: [PATCH 1/2] PHPAY-24-phpstan-9: feat: refactor arch phpay class --- .husky/pre-commit | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..6ecdc73 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,31 @@ +#!/usr/bin/env sh + +echo "=============================================" +echo "Pre Commit Hook - Running pint tests ๐Ÿงช" +echo "=============================================" + +pint_output=$(./vendor/bin/pint --test 2>&1) + +if [ $? -ne 0 ]; then + echo "Pint tests failed. Please fix the issues before pushing." + exit 1 +fi + +echo "๐ŸŸข Pint Ok!" + +echo "\n" + +echo "=============================================" +echo "Pre Commit Hook - Running PHPStan tests ๐Ÿงช" +echo "=============================================" + +pint_output=$(./vendor/bin/phpstan analyse -l 9 src tests 2>&1) + +if [ $? -ne 0 ]; then + echo "PHPStan tests failed. Please fix the issues before pushing." + exit 1 +fi + +echo "๐ŸŸข PHPStan Ok!" + +echo "\n" \ No newline at end of file From 98068a3b314b327f9a392578fa740ee73d56be33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Lucas?= Date: Wed, 18 Dec 2024 06:27:29 -0300 Subject: [PATCH 2/2] PHPAY-24-phpstan-9: feat: refactor arch phpay class --- .husky/pre-push | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index 42deb54..61798db 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,41 +1,7 @@ #!/usr/bin/env sh -echo "=============================================" -echo "Running pre-push hook ๐Ÿš€" -echo "=============================================" -echo "\n" -echo "=============================================" -echo "Running pint tests ๐Ÿงช" -echo "=============================================" - -pint_output=$(./vendor/bin/pint --test 2>&1) - -if [ $? -ne 0 ]; then - echo "Pint tests failed. Please fix the issues before pushing." - exit 1 -fi - -echo "๐ŸŸข Pint Ok!" - -echo "\n" - -echo "=============================================" -echo "Running PHPStan tests ๐Ÿงช" -echo "=============================================" - -pint_output=$(./vendor/bin/phpstan analyse -l 9 src tests 2>&1) - -if [ $? -ne 0 ]; then - echo "PHPStan tests failed. Please fix the issues before pushing." - exit 1 -fi - -echo "๐ŸŸข PHPStan Ok!" - -echo "\n" - # echo "=============================================" -# echo "Running pest tests ๐Ÿงช" +# echo "Pre Push Hook - Running pest tests ๐Ÿงช" # echo "=============================================" # pest_output=$(./vendor/bin/pest --colors=always --stop-on-failure 2>&1)