mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Handle strict typing in Checker and fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
4d5f2e64a5
commit
72e745be26
2 changed files with 9 additions and 1 deletions
|
|
@ -333,7 +333,12 @@ class Checker {
|
|||
return [];
|
||||
}
|
||||
|
||||
$signatureData = json_decode($this->fileAccessHelper->file_get_contents($signaturePath), true);
|
||||
$content = $this->fileAccessHelper->file_get_contents($signaturePath);
|
||||
$signatureData = null;
|
||||
|
||||
if (\is_string($content)) {
|
||||
$signatureData = json_decode($content, true);
|
||||
}
|
||||
if(!\is_array($signatureData)) {
|
||||
throw new InvalidSignatureException('Signature data not found.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ class CheckerTest extends TestCase {
|
|||
$this->cacheFactory = $this->createMock(ICacheFactory::class);
|
||||
$this->appManager = $this->createMock(IAppManager::class);
|
||||
|
||||
$this->config->method('getAppValue')
|
||||
->will($this->returnArgument(2));
|
||||
|
||||
$this->cacheFactory
|
||||
->expects($this->any())
|
||||
->method('createDistributed')
|
||||
|
|
|
|||
Loading…
Reference in a new issue