Files
portal/app/rector.php
T
Дмитрий 76ea9bbb04 feat(backend): Rector (#64) + PHP Insights (#65) install + configs
Rector: rector/rector ^2.4 + driftingly/rector-laravel ^2.3; app/rector.php
  (deadCode+codeQuality, conservative). composer rector / rector:fix scripts.
  dry-run baseline=16 files -> manual/CI posture, NOT blocking lefthook (ADR-013).
PHP Insights: nunomaduro/phpinsights; app/config/insights.php — SyntaxCheck removed
  (Windows subprocess crash + redundant), style not gated (Pint owns, BT4),
  security-check off. Baseline Code80/Complexity81/Arch75; floors set; composer insights -> 0.
allow-plugins += dealerdirect/phpcodesniffer-composer-installer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 04:21:26 +03:00

20 lines
644 B
PHP

<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
// Консервативный старт (A1 backend-tooling #64): мёртвый код + качество кода.
// БЕЗ type-declaration наборов и БЕЗ LaravelSetProvider (version-upgrade) на первом
// заходе — их прогоняем вручную при апгрейде Laravel, не как per-commit гейт.
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/database',
__DIR__ . '/routes',
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
);