chore: fix phpstan errors
This commit is contained in:
1 parent
4e925171b3
commit
0fcecc9c58
109 files changed
+510
-429
No files matched your search
@@ -37,7 +37,7 @@ class InsuranceParser extends AbstractParser
|
||||
|
||||
// Parse all individual insurances for reference lookup
|
||||
$insurance = $this->parseInsuranceNode($node, false);
|
||||
if (null !== $insurance && null !== $insurance->id) {
|
||||
if (null !== $insurance->id) {
|
||||
// Set complementary flag from XML attribute
|
||||
$insurance->complementary = $isComplementary;
|
||||
|
||||
@@ -53,7 +53,7 @@ class InsuranceParser extends AbstractParser
|
||||
$xmlContent->filterXPath('//versicherungspakete/versicherungspaket')
|
||||
->each(function (Crawler $node) use (&$insurances, $individualInsurances) {
|
||||
$insurance = $this->parseInsuranceNode($node, true, $individualInsurances);
|
||||
if (null !== $insurance && null !== $insurance->id) {
|
||||
if (null !== $insurance->id) {
|
||||
// Parse contained insurance IDs
|
||||
$insurance->containedInsuranceIds = $this->parseContainedInsuranceIds($node);
|
||||
|
||||
@@ -75,8 +75,8 @@ class InsuranceParser extends AbstractParser
|
||||
/**
|
||||
* Determines if a package contains any family insurances.
|
||||
*
|
||||
* @param Crawler $packageNode The package XML node
|
||||
* @param array<int, Insurance> $individualInsurances Parsed individual insurances for reference
|
||||
* @param Crawler $packageNode The package XML node
|
||||
* @param array<string, Insurance> $individualInsurances Parsed individual insurances for reference
|
||||
*
|
||||
* @return bool True if any contained insurance is a family insurance
|
||||
*/
|
||||
@@ -96,13 +96,13 @@ class InsuranceParser extends AbstractParser
|
||||
/**
|
||||
* Parses a single insurance or package node.
|
||||
*
|
||||
* @param Crawler $node The XML node to parse
|
||||
* @param bool $isPackage Whether this is a package node
|
||||
* @param array<int, Insurance> $individualInsurances Individual insurances for package family detection
|
||||
* @param Crawler $node The XML node to parse
|
||||
* @param bool $isPackage Whether this is a package node
|
||||
* @param array<string, Insurance> $individualInsurances Individual insurances for package family detection
|
||||
*
|
||||
* @return Insurance|null The parsed insurance object
|
||||
* @return Insurance The parsed insurance object
|
||||
*/
|
||||
private function parseInsuranceNode(Crawler $node, bool $isPackage, array $individualInsurances = []): ?Insurance
|
||||
private function parseInsuranceNode(Crawler $node, bool $isPackage, array $individualInsurances = []): Insurance
|
||||
{
|
||||
$insurance = new Insurance();
|
||||
$insurance->package = $isPackage;
|
||||
@@ -159,7 +159,7 @@ class InsuranceParser extends AbstractParser
|
||||
*
|
||||
* @param Crawler $xmlContent The XML content to scan
|
||||
*
|
||||
* @return array<int> Array of referenced insurance IDs
|
||||
* @return list<string> Array of referenced insurance IDs
|
||||
*/
|
||||
private function collectReferencedInsuranceIds(Crawler $xmlContent): array
|
||||
{
|
||||
@@ -180,7 +180,7 @@ class InsuranceParser extends AbstractParser
|
||||
*
|
||||
* @param Crawler $node The package XML node
|
||||
*
|
||||
* @return array<int> Array of contained insurance IDs (always int, as they reference individual insurances)
|
||||
* @return list<string> Array of contained insurance IDs
|
||||
*/
|
||||
private function parseContainedInsuranceIds(Crawler $node): array
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user