bin/analyse
#!/usr/bin/env bash
: <<'COPYRIGHT'
Copyright (c) Vaimo Group. All rights reserved.
See LICENSE_VAIMO.txt for license details.
COPYRIGHT
type=${1}
if [ "${type}" == "" ] || [ "${type}" == "phpcs" ] ; then
echo ">>> phpcs"
vendor/bin/phpcs -p src
result=${?}
if [ ${result} -gt 0 ] ; then
exit 1
fi
fi
if [ "${type}" == "" ] || [ "${type}" == "phpmd" ] ; then
echo ">>> phpmd"
vendor/bin/phpmd src text phpmd.xml --suffixes php
result=${?}
if [ ${result} -gt 0 ] ; then
exit 1
fi
fi
if [ "${type}" == "" ] || [ "${type}" == "phpcpd" ] ; then
echo ">>> phpcpd"
vendor/bin/phpcpd src modules
result=${?}
if [ ${result} -gt 0 ] ; then
exit 1
fi
fi