#!/bin/bash
set -e

# Clean up old coverage reports
COVERAGE_DIR="build/coverage"

if [ -d "$COVERAGE_DIR" ]; then
  echo "🧹 Cleaning up old coverage reports..."
  rm -rf "$COVERAGE_DIR"
fi

composer lint
echo "✅ Linting done"

composer phpstan
echo "✅ PHPStan done"

composer test
echo "✅ All checks passed"
