Skip to content
Code-Schnipsel Gruppen Projekte

fix(phpstan): code improvements and resolve warnings

Zusammengeführt Henning Leutz schlägt vor, next-2.x in main zu mergen.
2 Dateien
+ 5
1
Änderungen vergleichen
  • Nebeneinander
  • In der Reihe
Dateien
2
  • This commit includes a minor modification in the `phpstan.dist.neon` file where the `excludePaths`
    value has been updated. Besides, a conditional check has been added in the `onPackageSetup`
    function, under `Events.php` in the `src/QUI/ERP/Coupons` directory, to only proceed if the package
    name is 'quiqqer/coupons'. This additional check generally improves the efficiency and correctness
    of the package setup process.
@@ -44,6 +44,10 @@ class Events
*/
public static function onPackageSetup(QUI\Package\Package $Package): void
{
if ($Package->getName() !== 'quiqqer/coupons') {
return;
}
try {
self::createProductFields();
} catch (Exception $Exception) {
@@ -670,7 +674,7 @@ protected static function createProductFields(): void
'workingtitles' => $field['title'],
'description' => !empty($field['description']) ? $field['description'] : null,
'systemField' => 0,
'standardField' => !empty($field['standard']) ? 1 : 0,
'standardField' => !empty($field['standard']) ? 1 : 0, // @phpstan-ignore-line
'publicField' => !empty($field['public']) ? 1 : 0,
'options' => !empty($field['options']) ? $field['options'] : null,
'requiredField' => !empty($field['requiredField']) ? 1 : 0