Add comments to functions

This commit is contained in:
Oliver Davies 2024-07-20 13:56:04 +01:00
parent 97836712f2
commit ac8246704e

View file

@ -44,11 +44,13 @@ function cmd {
}
{% if not php.phpcs is same as false %}
# Run coding standards checks.
function coding-standards {
cmd phpcs "${@}"
}
{% endif %}
# Execute any Composer command.
function composer {
_exec php composer "${@}"
}
@ -60,14 +62,17 @@ function db {
docker compose exec database mysql -u"$DB_USER" -p"$DB_PASSWORD" "$DB_NAME"
}
# Execute any Drush command.
function drush {
_exec php drush "${@}"
}
# Disable Git hooks.
function git-hooks:off {
git config --unset core.hooksPath
}
# Enable Git hooks.
function git-hooks:on {
git config core.hooksPath .githooks
}
@ -86,12 +91,14 @@ function install {
drush site:install -y "${@}"
}
# Lint the Dockerfile.
function lint:dockerfile {
docker container run --rm -i \
hadolint/hadolint hadolint --ignore DL3008 --ignore DL3022 --ignore DL3059 -t style "${@}" - < Dockerfile
}
{% if not php.phpcs is same as false and not php.phpstan is same as false %}
# Run code quality checks.
function quality {
{% if not php.phpcs is same as false %}
coding-standards
@ -102,6 +109,7 @@ function quality {
}
{% endif %}
# Start the project.
function start {
cp -v --no-clobber .env.example .env || true