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

Merge branch 'next-2.x' into 'main'

fix(phpstan): correct exception handling and update code formatting

See merge request !9
Übergeordnete f5c219c0 16660b4c
Branches 1.5
Tags 1.5.4
2 Merge Requests!10Update 'next-3.x' with latest changes from 'main',!9fix(phpstan): correct exception handling and update code formatting
Pipeline-Nr. 15093 mit Warnungen bestanden
include:
- component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@2
inputs:
quiqqer-major-version: 1
- component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@main
# Remove the entire phpunit-php8.1 block, to allow PHPUnit to run on PHP 8.1 in your pipeline
phpunit-php8.1:
......
......@@ -18,18 +18,6 @@ function ($userId) {
try {
Google::disconnectAccount($userId);
} catch (QUI\Auth\Google\Exception $Exception) {
QUI::getMessagesHandler()->addError(
QUI::getLocale()->get(
'quiqqer/authgoogle',
'message.ajax.disconnectAccount.error',
[
'error' => $Exception->getMessage()
]
)
);
return false;
} catch (\Exception $Exception) {
QUI\System\Log::addError(
'AJAX :: package_quiqqer_authgoogle_ajax_disconnectAccount -> ' . $Exception->getMessage()
......
parameters:
ignoreErrors:
-
message: "#^Call to function is_null\\(\\) with QUI\\\\Users\\\\User will always evaluate to false\\.$#"
count: 1
path: src/QUI/Auth/Google/Auth.php
-
message: "#^Method QUI\\\\Auth\\\\Google\\\\Auth\\:\\:getPasswordResetControl\\(\\) should return QUI\\\\Control but returns null\\.$#"
count: 1
path: src/QUI/Auth/Google/Auth.php
-
message: "#^Property QUI\\\\Auth\\\\Google\\\\Auth\\:\\:\\$User \\(QUI\\\\Users\\\\User\\) does not accept QUI\\\\Users\\\\Nobody\\|null\\.$#"
count: 1
path: src/QUI/Auth/Google/Auth.php
-
message: "#^Call to function is_null\\(\\) with Google\\\\Client will always evaluate to false\\.$#"
count: 1
path: src/QUI/Auth/Google/Google.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: src/QUI/Auth/Google/Google.php
-
message: "#^Method QUI\\\\Registration\\\\Google\\\\Registrar\\:\\:validate\\(\\) should return array\\<QUI\\\\FrontendUsers\\\\InvalidFormField\\> but return statement is missing\\.$#"
count: 1
path: src/QUI/Registration/Google/Registrar.php
-
message: "#^Parameter \\#1 \\$ParentUser of method QUI\\\\Interfaces\\\\Users\\\\User\\:\\:save\\(\\) expects bool\\|QUI\\\\Users\\\\User, QUI\\\\Users\\\\SystemUser\\|null given\\.$#"
count: 1
path: src/QUI/Registration/Google/Registrar.php
-
message: "#^Parameter \\#2 \\$ParentUser of method QUI\\\\Interfaces\\\\Users\\\\User\\:\\:setPassword\\(\\) expects bool\\|QUI\\\\Users\\\\User, QUI\\\\Users\\\\SystemUser\\|null given\\.$#"
count: 1
path: src/QUI/Registration/Google/Registrar.php
-
message: "#^Parameter \\#2 \\$value of method QUI\\\\Interfaces\\\\Users\\\\User\\:\\:setAttribute\\(\\) expects array\\|int\\|string, bool given\\.$#"
count: 1
path: src/QUI/Registration/Google/Registrar.php
-
message: "#^Return type \\(void\\) of method QUI\\\\Registration\\\\Google\\\\Registrar\\:\\:onRegistered\\(\\) should be compatible with return type \\(int\\) of method QUI\\\\FrontendUsers\\\\AbstractRegistrar\\:\\:onRegistered\\(\\)$#"
count: 1
path: src/QUI/Registration/Google/Registrar.php
ignoreErrors:
\ No newline at end of file
......@@ -39,7 +39,7 @@ class Google
* @throws Exception
*/
public static function connectQuiqqerAccount(
int|string $uid,
int | string $uid,
string $accessToken,
bool $checkPermission = true
): void {
......@@ -83,7 +83,7 @@ public static function connectQuiqqerAccount(
* @throws Exception
* @throws QUI\Database\Exception
*/
public static function disconnectAccount(int|string $userId, bool $checkPermission = true): void
public static function disconnectAccount(int | string $userId, bool $checkPermission = true): void
{
if ($checkPermission !== false) {
self::checkEditPermission($userId);
......@@ -138,7 +138,7 @@ public static function getProfileData(string $accessToken): array
* @param int|string $userId - QUIQQER User ID
* @return array|false - details as array or false if no account connected to given QUIQQER User account ID
*/
public static function getConnectedAccountByQuiqqerUserId(int|string $userId): bool|array
public static function getConnectedAccountByQuiqqerUserId(int | string $userId): bool | array
{
$result = QUI::getDataBase()->fetch([
'from' => QUI::getDBTableName(self::TBL_ACCOUNTS),
......@@ -163,7 +163,7 @@ public static function getConnectedAccountByQuiqqerUserId(int|string $userId): b
* @throws Exception
* @throws QUI\Database\Exception|\QUI\Auth\Google\Exception
*/
public static function getConnectedAccountByGoogleIdToken(string $idToken): bool|array
public static function getConnectedAccountByGoogleIdToken(string $idToken): bool | array
{
self::validateAccessToken($idToken);
......@@ -267,7 +267,7 @@ protected static function getClientKey(): string
*
* @throws Exception
*/
protected static function checkEditPermission(int|string $userId): void
protected static function checkEditPermission(int | string $userId): void
{
if (QUI::getUserBySession()->getId() === QUI::getUsers()->getSystemUser()->getId()) {
return;
......
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