Fix psalm errors

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2022-10-27 13:05:53 -03:00
parent 8ea6e68aa0
commit 796718bd62
No known key found for this signature in database
GPG key ID: B7AB4B76A7CA7318
3 changed files with 23 additions and 7 deletions

View file

@ -3,7 +3,6 @@
namespace OCA\Libresign\Handler;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use OCA\Libresign\Exception\LibresignException;
@ -34,7 +33,7 @@ use OCA\Libresign\Helper\MagicGetterSetterTrait;
* @method string getOrganizationUnit()
* @method CfsslHandler setCfsslUri(string $cfsslUri)
* @method string getCfsslUri()
* @method CfsslHandler setClient(ClientInterface $client)
* @method CfsslHandler setClient(Client $client)
* @method string getConfigPath()
* @method CfsslHandler setConfigPath()
*/
@ -53,10 +52,10 @@ class CfsslHandler {
private $password;
private $configPath;
private $binary;
/** @var ClientInterface */
/** @var Client */
private $client;
public function getClient(): ClientInterface {
public function getClient(): Client {
if (!$this->client) {
$this->setClient(new Client(['base_uri' => $this->getCfsslUri()]));
}

View file

@ -17,8 +17,7 @@
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="Doctrine\DBAL\Types\Types" />
<referencedClass name="GuzzleHttp\Exception\ConnectException" />
<referencedClass name="GuzzleHttp\Exception\RequestException" />
<referencedClass name="GuzzleHttp\*" />
<referencedClass name="OC" />
<referencedClass name="OC\*" />
<referencedClass name="OCA\TwoFactorGateway\Service\Gateway\IGateway" />
@ -28,6 +27,7 @@
<errorLevel type="suppress">
<referencedClass name="Doctrine\DBAL\Schema\Table" />
<referencedClass name="GuzzleHttp\Client" />
<referencedClass name="GuzzleHttp\ClientInterface" />
<referencedClass name="OC\*" />
</errorLevel>
</UndefinedDocblockClass>

View file

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.29.0@7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3">
<file src="lib/AppInfo/Application.php">
<UndefinedClass occurrences="1">
<code>LoadSidebar</code>
</UndefinedClass>
</file>
<file src="lib/Command/Configure/Cfssl.php">
<MissingDependency occurrences="1">
<code>Base</code>
@ -38,6 +43,11 @@
<code>IRootFolder</code>
</MissingDependency>
</file>
<file src="lib/Listener/LoadSidebarListener.php">
<UndefinedClass occurrences="1">
<code>LoadSidebar</code>
</UndefinedClass>
</file>
<file src="lib/Migration/Version2040Date20211027183759.php">
<MissingDependency occurrences="3">
<code>$this-&gt;root</code>
@ -52,10 +62,17 @@
<code>IRootFolder</code>
<code>IRootFolder</code>
</MissingDependency>
<UndefinedClass occurrences="2">
<UndefinedClass occurrences="3">
<code>NewUserMailHelper</code>
<code>UUIDUtil</code>
<code>UUIDUtil</code>
</UndefinedClass>
<UndefinedDocblockClass occurrences="4">
<code>$this-&gt;newUserMail</code>
<code>$this-&gt;newUserMail</code>
<code>NewUserMailHelper</code>
<code>\OCA\Files\Node\File</code>
</UndefinedDocblockClass>
</file>
<file src="lib/Service/FileService.php">
<MissingDependency occurrences="3">