{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/opt\/php-tools\/phpstan.neon",
"old_string": " # Ignore patterns for gradual adoption\n ignoreErrors:\n - '#Parameter .* has no type specified#'\n - '#Method .* has no return type specified#'\n - '#Constant .* not found#'\n - '#Call to function in_array\\(\\) requires parameter#'",
"new_string": " # Ignore patterns for gradual adoption\n ignoreErrors:\n - '#Parameter .* has no type specified#'\n - '#Method .* has no return type specified#'\n - '#Constant .* not found#'\n - '#Call to function in_array\\(\\) requires parameter#'\n - '#Short ternary operator is not allowed#'\n - '#Construct empty\\(\\) is not allowed#'\n - '#Only booleans are allowed in#'"
}
}
{
"tool_response": {
"filePath": "\/opt\/php-tools\/phpstan.neon",
"oldString": " # Ignore patterns for gradual adoption\n ignoreErrors:\n - '#Parameter .* has no type specified#'\n - '#Method .* has no return type specified#'\n - '#Constant .* not found#'\n - '#Call to function in_array\\(\\) requires parameter#'",
"newString": " # Ignore patterns for gradual adoption\n ignoreErrors:\n - '#Parameter .* has no type specified#'\n - '#Method .* has no return type specified#'\n - '#Constant .* not found#'\n - '#Call to function in_array\\(\\) requires parameter#'\n - '#Short ternary operator is not allowed#'\n - '#Construct empty\\(\\) is not allowed#'\n - '#Only booleans are allowed in#'",
"originalFile": "includes:\n - vendor\/phpstan\/phpstan-strict-rules\/rules.neon\n\nparameters:\n level: 5\n excludePaths:\n - *\/vendor\/*\n - *\/storage\/*\n - *\/cache\/*\n - *\/View\/*\n reportUnmatchedIgnoredErrors: false\n\n # PHP 8.4 compatibility\n phpVersion: 80400\n\n # Ignore patterns for gradual adoption\n ignoreErrors:\n - '#Parameter .* has no type specified#'\n - '#Method .* has no return type specified#'\n - '#Constant .* not found#'\n - '#Call to function in_array\\(\\) requires parameter#'\n",
"structuredPatch": [
{
"oldStart": 19,
"oldLines": 3,
"newStart": 19,
"newLines": 6,
"lines": [
" - '#Method .* has no return type specified#'",
" - '#Constant .* not found#'",
" - '#Call to function in_array\\(\\) requires parameter#'",
"+ - '#Short ternary operator is not allowed#'",
"+ - '#Construct empty\\(\\) is not allowed#'",
"+ - '#Only booleans are allowed in#'"
]
}
],
"userModified": false,
"replaceAll": false
}
}