Skip to content
Code-Schnipsel Gruppen Projekte

Revisionen vergleichen

Änderungen werden so angezeigt, als ob die Quellrevision mit der Zielrevision zusammengeführt würde. Erfahre mehr über den Vergleich von Revisionen.

Quelle

Zielprojekt auswählen
No results found

Ziel

Zielprojekt auswählen
  • quiqqer/authgoogle
1 Ergebnis
Änderungen anzeigen
Commits auf Quelle (3)
  • Henning Leutz's avatar
    fix(phpstan): correct exception handling and update code formatting · 31abe9db
    verfasst von Henning Leutz
    The commit contains the following main changes:
    
    1. Updated exception handling in `ajax/disconnectAccount.php`. Removed the handling for
    `QUI\Auth\Google\Exception`.
    
    2. Significantly reduced ignored errors in `phpstan-baseline.neon`, indicating an overall
    improvement in code quality and removal of potential bugs.
    
    3. Applied consistent use of spaces around "|" operator in several method signatures within the
    `src/QUI/Auth/Google/Google.php` file.
    
    Related: #8
    31abe9db
  • Henning Leutz's avatar
    chore: update gitlab-ci component reference · 16660b4c
    verfasst von Henning Leutz
    Changes made to the .gitlab-ci.yml file to align with the current project dependencies. Quiqqer
    package bundle component link has been updated from version 2 to main. This allows the CI/CD
    pipeline to use the latest available updates from the main branch. Redundant inputs specifying the
    quiqqer-major-version have also been removed.
    16660b4c
  • Henning Leutz's avatar
    Merge branch 'next-2.x' into 'main' · abf320c0
    verfasst von Henning Leutz
    fix(phpstan): correct exception handling and update code formatting
    
    See merge request !9
    abf320c0
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;
......