## Summary
- Implements automatic cleanup mechanism for pending photo uploads older
than 24 hours
- Enhances error response to include actionable information about
pending uploads
- Adds CLI command for manual cleanup with dry-run support
## Changes Made
- **CLI/CleanupPendingUploadsCommand.php**: New command to auto-delete
stale `.oct` files
- **Web/Presenters/VKAPIPresenter.php**: Enhanced error response with
pending upload details
- **openvkctl**: Added cleanup command to CLI bootstrap
- **CLI/README.md**: Documentation with usage examples and cron setup
## Problem Solved
When users encounter "There are 3 pending already" error, they now
receive:
1. **Structured JSON response** with upload details (ID, filename, size,
age, timestamp)
2. **Automatic cleanup** removes uploads older than 24 hours
3. **Manual cleanup** available via CLI command with configurable age
threshold
## Usage
```bash
# Auto-cleanup (daily cron recommended)
php openvkctl cleanup-pending-uploads
# Custom age threshold
php openvkctl cleanup-pending-uploads --max-age=1
# Preview what would be deleted
php openvkctl cleanup-pending-uploads --dry-run
```
Fixes#1275
* feat: add phpstan for static analysis
* ci(actions): add phpstan action
* ci(actions): do analysing inside docker container
* fix(FetchToncoinTransactions): add var declaration
* fix(ServiceAPI/Wall): add var declaration
* fix(bootstrap): remove case-insensitive false vars
* fix(VKAPI/Handlers/Board): change parameters order
* fix(VKAPIRequestHandler): set fail's return type as never
* fix(VKAPI/Handlers/Groups): add array declaration
* fix(VKAPI/Handlers/Newsfeed): add return_banned declaration
* fix(VKAPI/Handlers/Notes): move $nodez declaration up
* fix(phpstan): most of the things and stupid lines of code
* fix(lint)
* fix(phpstan): less errors
* fix(lint): again. cuz i forgot about it
* fix(stan): all errors are gone now =3
---------
Co-authored-by: veselcraft <veselcraft@icloud.com>
* feat(lint): add php-cs-fixer for linting
Removing previous CODE_STYLE as it was not enforced anyway and using PER-CS 2.0.
This is not the reformatting commit.
* style: format code according to PER-CS 2.0 with php-cs-fixer
* ci(actions): add lint action
Resolves#1132.