Skip to content

Commit

Permalink
feat: Pint
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Dec 29, 2023
1 parent 920ba7b commit a43b644
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ install:
@sudo ln -sf $(shell pwd)/bin/phpunit /usr/local/bin/phpunit
@sudo ln -sf $(shell pwd)/bin/infection /usr/local/bin/infection
@sudo ln -sf $(shell pwd)/bin/pest /usr/local/bin/pest
@sudo ln -sf $(shell pwd)/bin/pint /usr/local/bin/pint
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ phpctl sh echo 'Hello, World!' # To run arbitrary sh commands inside the contain
| `repl` | Starts a PHP REPL session (powered by [PsySH](https://psysh.org/)). |
| `php-cs-fixer` | Runs [PHP-CS-Fixer](https://cs.symfony.com/). |
| `phpstan` | Runs [PHPStan](https://phpstan.org/). |
| `infection` | Runs [Infection](https://infection.github.io/). |
| `pest` | Runs [Pest](https://pestphp.com/). |
| `infection` | Runs [Infection](https://infection.github.io). |
| `pest` | Runs [Pest](https://pestphp.com). |
| `pint` | Runs [Pint](https://github.com/laravel/pint). |
| `box` | Runs [Box](https://github.com/box-project/box). |
| `bundle` | Bundles a project into an image and ships it as a single binary file. |

Expand Down
2 changes: 2 additions & 0 deletions bin/pint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
phpctl pint $@
2 changes: 2 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ symlink() {
sudo ln -sf "${INSTALL_DIR}/bin/infection" /usr/local/bin/infection
sudo ln -sf "${INSTALL_DIR}/bin/phpunit" /usr/local/bin/phpunit
sudo ln -sf "${INSTALL_DIR}/bin/pest" /usr/local/bin/pest
sudo ln -sf "${INSTALL_DIR}/bin/pint" /usr/local/bin/pint
}

echo "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
Expand Down Expand Up @@ -39,5 +40,6 @@ else
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpstan /usr/local/bin/phpstan"
echo " sudo ln -sf ${INSTALL_DIR}/bin/infection /usr/local/bin/infection"
echo " sudo ln -sf ${INSTALL_DIR}/bin/pest /usr/local/bin/pest"
echo " sudo ln -sf ${INSTALL_DIR}/bin/pint /usr/local/bin/pint"
echo ""
fi
Binary file added rootfs/usr/local/bin/pint
Binary file not shown.
1 change: 1 addition & 0 deletions src/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ help() {
echo -e "\033[0;32m phpstan \033[0m Runs PHPStan"
echo -e "\033[0;32m infection \033[0m Runs Infection, a PHP Mutation Testing Framework"
echo -e "\033[0;32m pest \033[0m Runs Pest"
echo -e "\033[0;32m pint \033[0m Runs Pint"
echo -e "\033[0;32m create [framework] [dir] \033[0m Creates a new project using the given framework (or package)"
echo -e "\033[0;32m init [skeleton] \033[0m Initializes a skeleton configuration (phpunit, php-cs-fixer)"
echo -e "\033[0;32m box \033[0m Runs Box (PHAR builder)"
Expand Down
10 changes: 8 additions & 2 deletions src/php.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# shellcheck disable=SC2068

php() {
run -- php ${@--v}
}

composer() {
run -- composer $@
run -- composer ${@}
}

repl() {
run -- psysh
run -- psysh ${@}
}

server() {
Expand Down Expand Up @@ -60,3 +62,7 @@ pest() {

run -- vendor/bin/pest ${@}
}

pint() {
run -- pint ${@}
}

0 comments on commit a43b644

Please sign in to comment.