All checks were successful
Publish Release / release (push) Successful in 10s
- Auto-create 'Initial Operating System' and 'Initial SSH Key' custom fields via Database::ensureCustomFields() on module load, eliminating the manual modify.sql step - Delete modify.sql (no longer needed) - Add try/catch blocks around every DB operation and API call across all PHP files per CLAUDE.md error handling rules - Add comprehensive PHPDoc to all classes, methods, and properties - Set up Laravel Pint (laravel/pint) with Laravel-style preset for consistent code formatting across the codebase - Add git pre-commit hook (hooks/pre-commit) that runs Pint on staged PHP files, auto-installed via Composer post-install/post-update scripts - Simplify README installation to a single copy-paste command Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
620 B
Bash
Executable File
27 lines
620 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Run Pint on staged PHP files before committing.
|
|
# Fixes formatting in-place and re-stages the corrected files.
|
|
|
|
STAGED_PHP=$(git diff --cached --name-only --diff-filter=ACM | grep '\.php$')
|
|
|
|
if [ -z "$STAGED_PHP" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Check that Pint is installed
|
|
if [ ! -x "./vendor/bin/pint" ]; then
|
|
echo "Error: laravel/pint is not installed. Run 'composer install' first."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Running Pint on staged PHP files..."
|
|
./vendor/bin/pint $STAGED_PHP
|
|
|
|
# Re-stage any files that Pint modified
|
|
for FILE in $STAGED_PHP; do
|
|
if [ -f "$FILE" ]; then
|
|
git add "$FILE"
|
|
fi
|
|
done
|