Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 6d29ce39 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: set correct return types

Übergeordneter a88680ff
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!95Next,!94Dev
Pipeline-Nr. 8021 bestanden
......@@ -76,8 +76,11 @@ public static function getArea(): Areas\Area
$Area = QUI\ERP\Areas\Utils::getAreaByCountry($Country);
}
/* @var $Area QUI\ERP\Areas\Area */
return $Area;
if ($Area instanceof QUI\ERP\Areas\Area) {
return $Area;
}
throw new QUI\Exception('The ecoyn default area was not found. Please check your ecoyn area settings.');
}
/**
......@@ -258,10 +261,10 @@ public static function getDateFormat(bool|string $lang = false): string
* Return the ERP logo
* - if no logo is set, the default logo of the default project will be used
*
* @return false|QUI\Projects\Media\Image|string
* @return ?QUI\Projects\Media\Image
* @throws QUI\Exception
*/
public static function getLogo(): QUI\Projects\Media\Image|bool|string
public static function getLogo(): ?QUI\Projects\Media\Image
{
try {
$Config = QUI::getPackage('quiqqer/erp')->getConfig();
......
......@@ -507,7 +507,7 @@ public function isNetto(): bool
$Config = $Package->getConfig();
if ($Config->getValue('general', 'businessType') === 'B2B') {
return QUI\ERP\Utils\User::IS_NETTO_USER;
return true;
}
} catch (QUI\Exception) {
}
......@@ -648,7 +648,7 @@ public function setGroups(array|string $groups)
/**
* @param bool $array
* @return int[]|Group[]
* @return int[]|string[]|Group[]
*/
public function getGroups(bool $array = true): array
{
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren