chore: major code cleanup and type safety using phpstan

This commit is contained in:
Björn Fromme committed 2026-04-16 17:11:16 +02:00
1 parent 060cbea9da
commit 3da73d626b
103 files changed
+976 -1192

No files matched your search

+4 -2
View File
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\XmlParser;
@@ -15,10 +16,11 @@ class ProductsParser extends AbstractParser
$result
->filterXPath('//produkte/produkt')
->each(function (Crawler $node) use (&$products) {
if (false === empty($node->attr('code'))) {
$code = $node->attr('code');
if (null !== $code && '' !== $code) {
$product = new Product();
$product->id = (int) $node->attr('id');
$product->code = (string) $node->attr('code');
$product->code = $code;
$product->name = (string) $node->attr('bezeichnung');
$products[$product->id] = $product;