Qual: Fix PhanUndeclaredMethod (#30661)

* Qual: Fix PhanUndeclaredMethod cases

* Fix PhanUndeclaredMethod cases

* Qual: Remove PhanUndeclaredMethod exceptions

* Fix spelling "disacard"

* Improve phpdoc, add abstract method to trait for typing

* Improve phpdoc typing for PHanUndeclaredMethod

* Suppress phan notices for guarded AliasNbPages calls

* Fix return value for printFile stub

* Fix getting message from Exception

* Define dummy getAllByProducts(), typing for it.

* Fix typo in comment

* Qual: Better typing for apiService (phan)

* Test that the Generic OAuth Service is provided

* Qual: Fix getSqlArrayForStats typing

* Force modTcpdfbarcode

* Correct typing hint

* Set ModelePDFAsset typehint

* Fix ModelePDFUserGroup typing hint

* Fix phan typing hints htdocs/core/modules/printing/printgcp.modules.php

* Fix write_file in ModelePDFStock*

* Update printsheet.php

* Adjust typing hint for barcode generator

* Update printsheet.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
MDW
2024-08-19 02:05:27 +02:00
committed by GitHub
parent 009e93a4c2
commit d71cd352d5
96 changed files with 480 additions and 374 deletions

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -87,6 +88,7 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) {
// Instantiate the Api service using the credentials, http client and storage mechanism for the token
$apiService = $serviceFactory->createService('GitHub', $credentials, $storage, $requestedpermissionsarray);
'@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface
// access type needed to have oauth provider refreshing token
//$apiService->setAccessType('offline');