Skip to content
Code-Schnipsel Gruppen Projekte
Commit 78d9b1e2 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix(phpstan): enhance code readability and adopt safer practices

Several changes have been made across multiple files to enhance code readability and follow safer
coding practices.

1. Breakdown of long lines of attributes/code into multiple lines with added comments for better
readability. This was done in Submenu.php

2. Replaced '==' operation with 'empty()' function to check for empty strings in Submenu.php

3. Safer checking of if method 'getCachePath' exists on 'getSite' to avoid potential errors &
Ensure the last insert ID is always an integer in the database PDO in DropDownMenu.php and
Factory.php

4. Refactor conditions for more clear type hinting in multiple files; including
Independent/Handler.php, Independent/Items/AbstractMenuItem.php, Independent/Items/Site.php,
Independent/Menu.php, MegaMenu.php, and NavTabs.php

The concept of safe concatenation or use of '|null|' has been introduced where needed across many
files.

Related: #38
Übergeordneter 6f309bd3
No related branches found
No related tags found
2 Merge Requests!37Update 'next-4.x' with latest changes from 'main',!36chore: update phpstan version and remove phpstan-baseline
Pipeline #15990 bestanden mit Phase
in 1 Minute und 39 Sekunden
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren