#!/bin/bash

# Run a specific Composer script before committing
echo "Running Composer script..."
composer run phpcs-config
composer run phpcs

# Exit with status code 1 if the Composer script fails
if [ $? -ne 0 ]; then
    echo "Composer script failed. Aborting commit."
    exit 1
fi

# Continue with the commit
echo "No errors detected. Proceeding with the commit..."
exit 0
