diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index 36b72df..28a0af8 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -12,14 +12,14 @@ if [[ "$FILE" =~ ^.+(php)$ ]]; then fi # phpcs - ${rootpath}/vendor/bin/phpcs --standard="${rootpath}/Build/Config/phpcs.xml" --encoding=utf-8 -n -p $FILE + php -d memory_limit=4G ${rootpath}/vendor/bin/phpcs --standard="${rootpath}/Build/Config/phpcs.xml" --encoding=utf-8 -n -p $FILE if [ $? -ne 0 ]; then echo -e "\e[1;31m\tCode Sniffer error.\e[0m" >&2 exit 1 fi # phpmd - ${rootpath}/vendor/bin/phpmd $FILE text ${rootpath}/Build/Config/phpmd.xml --exclude *tests* --minimumpriority 1 + php -d memory_limit=4G ${rootpath}/vendor/bin/phpmd $FILE text ${rootpath}/Build/Config/phpmd.xml --exclude *tests* --minimumpriority 1 if [ $? -ne 0 ]; then echo -e "\e[1;31m\tMess Detector error.\e[0m" >&2 exit 1 diff --git a/Hooks/tests.sh b/Hooks/tests.sh index 69e5327..8cac2de 100644 --- a/Hooks/tests.sh +++ b/Hooks/tests.sh @@ -5,7 +5,7 @@ git diff --cached --name-only | while read FILE; do if [[ "$FILE" =~ ^.+(php)$ ]]; then if [[ -f $FILE ]]; then # phan - ${rootpath}/vendor/bin/phan -k ${rootpath}/Build/Config/phan.php -f $FILE + php -d memory_limit=4G ${rootpath}/vendor/bin/phan -k ${rootpath}/Build/Config/phan.php -f $FILE if [ $? -ne 0 ]; then echo -e "\e[1;31m\tPhan error.\e[0m" >&2 exit 1;