eb8ca65c5d
Закрыт TODO (a) из v1.49: общая логика выбора активного supplier'а через
project_suppliers m2m была дублирована между ProcessWebhookJob (webhook-flow)
и DealController (manual-create) — 11 одинаковых строк query-builder'а на
2 файла. Теперь — единственный источник истины + DI через app() (тот же
паттерн, что у DuplicateDetector в v1.23).
App\Services\SupplierResolver:
- resolveForProject(Project): ?int — точная копия прежней query
(project_suppliers JOIN suppliers, is_active+is_active, ORDER BY
sort_order, id).
- costRubSnapshot(int $supplierId): string — вынесенный snapshot цены
для записи в supplier_lead_costs.
ProcessWebhookJob и DealController:
- Удалены private resolveSupplierId() (по 14 строк).
- Удалены локальные DB::table('suppliers')->value('cost_rub').
- Используют app(SupplierResolver::class) внутри handle()/store().
Pest +8 в tests/Feature/Services/SupplierResolverTest.php:
- null без связей / единственный активный / пропуск inactive supplier /
пропуск inactive m2m / ORDER BY sort_order / null если все inactive /
изоляция по project_id / costRubSnapshot формат '137.50'.
PHPStan baseline регенерирован.
Регресс:
- Pint + PHPStan passed (baseline регенерирован).
- Pest 174/174 за 21.46 сек (+8 от 166, 708 assertions).
- Vitest 247/247 за 17.53 сек (нетронут — backend-only refactor).
Реестр v1.58→v1.59 / CLAUDE.md v1.49→v1.50.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
374 lines
12 KiB
Plaintext
374 lines
12 KiB
Plaintext
parameters:
|
|
ignoreErrors:
|
|
-
|
|
message: '#^Cannot call method toIso8601String\(\) on null\.$#'
|
|
identifier: method.nonObject
|
|
count: 1
|
|
path: app/Http/Controllers/Api/ImpersonationController.php
|
|
|
|
-
|
|
message: '#^Strict comparison using \!\=\= between int and null will always evaluate to true\.$#'
|
|
identifier: notIdentical.alwaysTrue
|
|
count: 1
|
|
path: app/Http/Middleware/SetTenantContext.php
|
|
|
|
-
|
|
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\ProjectFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\Project, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\Project\>\:\:definition\(\)$#'
|
|
identifier: method.childReturnType
|
|
count: 1
|
|
path: database/factories/ProjectFactory.php
|
|
|
|
-
|
|
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\TenantFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\Tenant, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\Tenant\>\:\:definition\(\)$#'
|
|
identifier: method.childReturnType
|
|
count: 1
|
|
path: database/factories/TenantFactory.php
|
|
|
|
-
|
|
message: '#^Return type \(array\<string, mixed\>\) of method Database\\Factories\\UserFactory\:\:definition\(\) should be compatible with return type \(array\<model property of App\\Models\\User, mixed\>\) of method Illuminate\\Database\\Eloquent\\Factories\\Factory\<App\\Models\\User\>\:\:definition\(\)$#'
|
|
identifier: method.childReturnType
|
|
count: 1
|
|
path: database/factories/UserFactory.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\Mixins\\Expectation\<mixed\>\:\:\$not\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/AdminSystemSettingsTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$adminId\.$#'
|
|
identifier: property.notFound
|
|
count: 11
|
|
path: tests/Feature/AdminSystemSettingsTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:getJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 1
|
|
path: tests/Feature/AdminSystemSettingsTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:putJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 8
|
|
path: tests/Feature/AdminSystemSettingsTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 9
|
|
path: tests/Feature/Auth/AuthControllerTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:getJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 2
|
|
path: tests/Feature/Auth/AuthControllerTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 14
|
|
path: tests/Feature/Auth/AuthControllerTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 5
|
|
path: tests/Feature/Auth/ForgotPasswordTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 9
|
|
path: tests/Feature/Auth/ForgotPasswordTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 7
|
|
path: tests/Feature/Auth/IpLockoutTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 6
|
|
path: tests/Feature/Auth/IpLockoutTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 8
|
|
path: tests/Feature/Auth/RateLimitTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 18
|
|
path: tests/Feature/Auth/RateLimitTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$plainCodes\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/RecoveryCodeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/RecoveryCodeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$user\.$#'
|
|
identifier: property.notFound
|
|
count: 2
|
|
path: tests/Feature/Auth/RecoveryCodeTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 7
|
|
path: tests/Feature/Auth/RecoveryCodeTest.php
|
|
|
|
-
|
|
message: '#^Parameter \#1 \$self of function startPending expects Tests\\TestCase, Pest\\PendingCalls\\TestCall given\.$#'
|
|
identifier: argument.type
|
|
count: 5
|
|
path: tests/Feature/Auth/RecoveryCodeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/ResetPasswordTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$user\.$#'
|
|
identifier: property.notFound
|
|
count: 7
|
|
path: tests/Feature/Auth/ResetPasswordTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 7
|
|
path: tests/Feature/Auth/ResetPasswordTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/SuspiciousLoginNotificationTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$user\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/SuspiciousLoginNotificationTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 7
|
|
path: tests/Feature/Auth/SuspiciousLoginNotificationTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/TwoFactorSetupTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$user\.$#'
|
|
identifier: property.notFound
|
|
count: 16
|
|
path: tests/Feature/Auth/TwoFactorSetupTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:actingAs\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/TwoFactorSetupTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 16
|
|
path: tests/Feature/Auth/TwoFactorSetupTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$google2fa\.$#'
|
|
identifier: property.notFound
|
|
count: 4
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$totpSecret\.$#'
|
|
identifier: property.notFound
|
|
count: 4
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$user\.$#'
|
|
identifier: property.notFound
|
|
count: 4
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:getJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 2
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 11
|
|
path: tests/Feature/Auth/TwoFactorTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 30
|
|
path: tests/Feature/DealCreateTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 18
|
|
path: tests/Feature/DealCreateTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$adminId\.$#'
|
|
identifier: property.notFound
|
|
count: 15
|
|
path: tests/Feature/ImpersonationTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 15
|
|
path: tests/Feature/ImpersonationTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:getJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 2
|
|
path: tests/Feature/ImpersonationTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 17
|
|
path: tests/Feature/ImpersonationTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 20
|
|
path: tests/Feature/LookupsTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:getJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 5
|
|
path: tests/Feature/LookupsTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 3
|
|
path: tests/Feature/LookupsTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$partitionsBefore\.$#'
|
|
identifier: property.notFound
|
|
count: 2
|
|
path: tests/Feature/PartitionsCreateMonthsTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$project1Id\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/RlsSmokeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$project2Id\.$#'
|
|
identifier: property.notFound
|
|
count: 1
|
|
path: tests/Feature/RlsSmokeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant1Id\.$#'
|
|
identifier: property.notFound
|
|
count: 5
|
|
path: tests/Feature/RlsSmokeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant2Id\.$#'
|
|
identifier: property.notFound
|
|
count: 5
|
|
path: tests/Feature/RlsSmokeTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$project\.$#'
|
|
identifier: property.notFound
|
|
count: 19
|
|
path: tests/Feature/Services/SupplierResolverTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$resolver\.$#'
|
|
identifier: property.notFound
|
|
count: 10
|
|
path: tests/Feature/Services/SupplierResolverTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 2
|
|
path: tests/Feature/Services/SupplierResolverTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:get\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 2
|
|
path: tests/Feature/SetTenantContextTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:withHeaders\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 3
|
|
path: tests/Feature/SetTenantContextTest.php
|
|
|
|
-
|
|
message: '#^Access to an undefined property Pest\\PendingCalls\\TestCall\:\:\$tenant\.$#'
|
|
identifier: property.notFound
|
|
count: 20
|
|
path: tests/Feature/WebhookReceiveTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:call\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 3
|
|
path: tests/Feature/WebhookReceiveTest.php
|
|
|
|
-
|
|
message: '#^Call to an undefined method Pest\\PendingCalls\\TestCall\:\:postJson\(\)\.$#'
|
|
identifier: method.notFound
|
|
count: 14
|
|
path: tests/Feature/WebhookReceiveTest.php
|
|
|
|
-
|
|
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
|
|
identifier: method.alreadyNarrowedType
|
|
count: 1
|
|
path: tests/Unit/ExampleTest.php
|