Format PHP Code (PHP-CS-Fixer)
format_php_codeFormat PHP code according to PSR-12 standards. Preview changes with dry run or apply formatting directly, with optional backup of original file.
Instructions
PHP-CS-Fixer (PSR-12) ile bir PHP dosyasını formatlar. 'dryRun' true ise sadece diff gösterir, false ise dosyayı yerinde günceller.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filepath": "<filepath>"
},
"name": "format_php_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Sadece önizleme diff gösterir (true). Dosyayı yazmak için false kullanın. | |
| filepath | Yes | Formatlanacak PHP dosyasının yolu. Örnek: ./src/Foo.php | |
| createBackup | No | Format öncesi orijinali geçici bir dizine yedekler. Varsayılan: false. |