# Sloppy: Static Analysis for AI-Written PHP

DevFeed: [Sloppy: Static Analysis for AI-Written PHP](<https://devfeed.tech/articles/sloppy-static-analysis-for-ai-written-php-104143.md>)

Original publisher: [Read original article](<https://laravel-news.com/sloppy>)

Author: Yannick Lyn Fatt

Published: 2026-10-26T02:32:21Z

Content type: article

Language: en

Sources: [Laravel](<https://devfeed.tech/sources/laravel.md>)

Topics: [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Laravel](<https://devfeed.tech/topics/laravel.md>), [Eloquent ORM](<https://devfeed.tech/topics/eloquent.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Composer](<https://devfeed.tech/topics/composer.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [coding-agent](<https://devfeed.tech/tags/coding-agent.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [hooks](<https://devfeed.tech/tags/hooks.md>), [laravel](<https://devfeed.tech/tags/laravel.md>), [laravel-packages](<https://devfeed.tech/tags/laravel-packages.md>), [loops](<https://devfeed.tech/tags/loops.md>), [php](<https://devfeed.tech/tags/php.md>), [query](<https://devfeed.tech/tags/query.md>), [static-analysis](<https://devfeed.tech/tags/static-analysis.md>)

## AI overview

Sloppy is a local static analyzer for PHP maintenance issues, including swallowed exceptions, inefficient Eloquent queries, possible N+1 queries, and unfinished implementations. It does not detect AI authorship and complements type checkers, formatters, and tests. Findings include locations, confidence, measurements, and suggested changes, but developers decide how to handle failures or structural refactors. Agent integrations can feed findings back during edits; their finish hook blocks once and permits a later finish with unresolved findings, so CI checks are needed for a build gate. Branch diff and review commands focus on findings since the merge base, while baselines record existing issues. Sloppy requires PHP 8.3 or later; its Artisan commands and Laravel rules support Laravel 12 and 13. Optional Rector and Pint dependencies support mechanical fixes, which can be previewed before applying.

## Source excerpt

Sloppy checks AI-written PHP for swallowed exceptions, query loops, and unfinished code, with coding-agent hooks and reviews focused on new findings. The post Sloppy: Static Analysis for AI-Written PHP appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.