-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * Update composer.json * Update composer.json Co-authored-by: Samuel Štancl <[email protected]> * Update composer.json Co-authored-by: Samuel Štancl <[email protected]> * Update ci.yml * Update composer.json * wip * wip * Update ci.yml * typehint -> type * Update phpstan.neon * Update composer.json * Update composer.json * wip * Update composer.json * Update composer.json * Update composer.json Co-authored-by: Samuel Štancl <[email protected]>
- Loading branch information
1 parent
1b1eca8
commit 263e0aa
Showing
8 changed files
with
98 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.phpunit.result.cache | ||
composer.lock | ||
vendor/ | ||
.php_cs.cache | ||
.php-cs-fixer.cache | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
offer_run() { | ||
read -p "For more output, run $1. Run it now (Y/n)? " run | ||
|
||
case ${run:0:1} in | ||
n|N ) | ||
exit 1 | ||
;; | ||
* ) | ||
$1 | ||
;; | ||
esac | ||
|
||
exit 1 | ||
} | ||
|
||
if (php-cs-fixer fix --dry-run --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then | ||
echo '✅ php-cs-fixer OK' | ||
else | ||
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix | ||
case ${fix:0:1} in | ||
n|N ) | ||
echo '❌ php-cs-fixer FAIL' | ||
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php' | ||
;; | ||
* ) | ||
if (php-cs-fixer fix --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then | ||
echo '✅ php-cs-fixer OK' | ||
else | ||
echo '❌ php-cs-fixer FAIL' | ||
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php' | ||
fi | ||
;; | ||
esac | ||
fi | ||
|
||
if (./vendor/bin/phpstan analyse > /dev/null 2>/dev/null); then | ||
echo '✅ PHPStan OK' | ||
else | ||
echo '❌ PHPStan FAIL' | ||
offer_run './vendor/bin/phpstan analyse' | ||
fi | ||
|
||
if (./vendor/bin/phpunit > /dev/null 2>/dev/null); then | ||
echo '✅ PHPUnit OK' | ||
else | ||
echo '❌ PHPUnit FAIL' | ||
offer_run './vendor/bin/phpunit' | ||
fi | ||
|
||
echo '==================' | ||
echo '✅ Everything OK' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters