Files
clinicpro/phpstan-baseline.neon
T
hamedandClaude Opus 5 58c6d9ac18 feat(insurance): resolve coverage percent per service category
Base insurance is a percentage-only rule: patient share is now total minus the
base share, and the contract franchise no longer inflates it (franchise stays
meaningful for supplementary contracts only).

Coverage percentages are managed centrally by admin per service category
(outpatient/inpatient, extensible via the ServiceCategory enum). A tenant
contract may override a category, otherwise it follows the admin default live —
changing the central value immediately applies to every contract that did not
override it.

- add ServiceCategory enum + GET /api/v1/service-categories as the single source
  of the category list for every client
- add insurance_coverage_defaults (+ GET/PUT admin coverage-defaults endpoints)
  and expose coverage_defaults on the insurance list and insurance-pricing
- add tenant_insurance_category_coverage; tenant-insurances accepts optional
  category_coverages (needs insurances.update) and returns the effective
  percentages with their source
- add service_items.service_category; visits always resolve as outpatient
- drop the reverse-engineered percent from patient_share_rials in MyPatientsPage
  and align the client-side BillingCalculator mirror in CreateStep

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 16:21:19 +03:30

164 lines
6.5 KiB
Plaintext

parameters:
ignoreErrors:
-
message: '#^Dead catch \- Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException is never thrown in the try block\.$#'
identifier: catch.neverThrown
count: 1
path: src/Appointment/Controller/AppointmentController.php
-
message: '#^Property App\\Patient\\Entity\\PatientRecord\:\:\$tags on left side of \?\?\= is not nullable nor uninitialized\.$#'
identifier: nullCoalesce.initializedProperty
count: 1
path: src/Patient/Entity/PatientRecord.php
-
message: '#^Strict comparison using \!\=\= between mixed and null will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 1
path: src/Appointment/Service/SlotCalculatorService.php
-
message: '#^Offset ''role'' on array\{type\: ''clinic'', db_uuid\: mixed, name\: non\-falsy\-string, role\: ''secretary'', scope\: ''clinic'', permissions\: mixed\}\|array\{type\: ''clinic'', db_uuid\: string, name\: string, role\: ''clinic''\|''doctor'', scope\: ''clinic''\|null, doctor_uuid\: string\}\|array\{type\: ''clinic'', db_uuid\: string, name\: string, role\: ''clinic''\}\|array\{type\: ''doctor'', db_uuid\: mixed, name\: non\-falsy\-string, role\: ''secretary'', scope\: ''doctor'', permissions\: mixed\}\|array\{type\: ''doctor'', db_uuid\: string, name\: non\-falsy\-string, role\: ''doctor''\} on left side of \?\? always exists and is not nullable\.$#'
identifier: nullCoalesce.offset
count: 1
path: src/Auth/Controller/AuthController.php
-
message: '#^Call to an undefined method Symfony\\Component\\Security\\Core\\User\\UserInterface\:\:getId\(\)\.$#'
identifier: method.notFound
count: 2
path: src/Auth/Security/PasswordAuthenticator.php
-
message: '#^Call to an undefined method Symfony\\Component\\Security\\Core\\User\\UserInterface\:\:isStaff\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Auth/Security/PasswordAuthenticator.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:getItem\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Auth/Security/PasswordAuthenticator.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:save\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Auth/Security/PasswordAuthenticator.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:getItem\(\)\.$#'
identifier: method.notFound
count: 4
path: src/Auth/Service/OtpService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:save\(\)\.$#'
identifier: method.notFound
count: 3
path: src/Auth/Service/OtpService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:getItem\(\)\.$#'
identifier: method.notFound
count: 2
path: src/Auth/Service/TokenService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:save\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Auth/Service/TokenService.php
-
message: '#^Match expression does not handle remaining value\: string$#'
identifier: match.unhandled
count: 1
path: src/Billing/Controller/BillingController.php
-
message: '#^Parameter \#3 \$filters of method App\\Billing\\Repository\\ClaimRepository\:\:findByTenant\(\) expects array\{status\?\: string\|null, insurance_id\?\: int\|null, from\?\: int\|null, to\?\: int\|null, q\?\: string\|null\}, array\{status\: non\-falsy\-string\|null, insurance_id\: non\-falsy\-string\|null, from\: non\-falsy\-string\|null, to\: non\-falsy\-string\|null, q\: non\-falsy\-string\|null\} given\.$#'
identifier: argument.type
count: 1
path: src/Billing/Controller/BillingController.php
-
message: '#^Using nullsafe property access "\?\-\>franchiseRials" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 1
path: src/Billing/Service/BillingCalculator.php
-
message: '#^Call to protected method getEntityManager\(\) of class Doctrine\\ORM\\EntityRepository\<object\>\.$#'
identifier: method.protected
count: 1
path: src/Billing/Service/ClaimService.php
-
message: '#^Strict comparison using \=\=\= between App\\Auth\\Entity\\User and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: src/Blog/Entity/Blog.php
-
message: '#^Call to protected method getEntityManager\(\) of class Doctrine\\ORM\\EntityRepository\<object\>\.$#'
identifier: method.protected
count: 1
path: src/Insurance/Controller/InsuranceController.php
-
message: '#^Strict comparison using \!\=\= between mixed and null will always evaluate to true\.$#'
identifier: notIdentical.alwaysTrue
count: 6
path: src/Insurance/Controller/InsuranceController.php
-
message: '#^Property App\\Patient\\Service\\PatientService\:\:\$userRepo is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/Patient/Service/PatientService.php
-
message: '#^Offset 0 on non\-empty\-list\<string\> on left side of \?\? always exists and is not nullable\.$#'
identifier: nullCoalesce.offset
count: 1
path: src/Payment/Gateway/MellatGateway.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:deleteItem\(\)\.$#'
identifier: method.notFound
count: 2
path: src/Payment/Service/CircuitBreakerService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:getItem\(\)\.$#'
identifier: method.notFound
count: 3
path: src/Payment/Service/CircuitBreakerService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:save\(\)\.$#'
identifier: method.notFound
count: 2
path: src/Payment/Service/CircuitBreakerService.php
-
message: '#^Call to an undefined method Symfony\\Contracts\\Cache\\CacheInterface\:\:getItem\(\)\.$#'
identifier: method.notFound
count: 1
path: src/Shared/Controller/HealthController.php
-
message: '#^Call to protected method getEntityManager\(\) of class Doctrine\\ORM\\EntityRepository\<object\>\.$#'
identifier: method.protected
count: 1
path: src/Sms/Command/SeedSmsMessageTemplatesCommand.php
-
message: '#^Property App\\Subscription\\Controller\\SubscriptionController\:\:\$subscriptionRepo is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/Subscription/Controller/SubscriptionController.php