Merge pull request #2784 from owncloud/php-types-check

[Tests-Only][full-ci] enforce strict type checking for php api tests
This commit is contained in:
Phil Davis
2021-11-29 13:53:34 +05:45
committed by GitHub
4 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* ownCloud
*
@@ -207,7 +207,7 @@ class ArchiverContext implements Context {
*
* @throws Exception
*/
public function theDownloadedArchiveShouldContainTheseFiles(string $type, TableNode $expectedFiles) {
public function theDownloadedArchiveShouldContainTheseFiles(string $type, TableNode $expectedFiles):void {
$this->featureContext->verifyTableNodeColumns($expectedFiles, ['name', 'content']);
$tempFile = \tempnam(\sys_get_temp_dir(), 'OcAcceptanceTests_');
\unlink($tempFile); // we only need the name

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* ownCloud
*

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* ownCloud
*
@@ -163,7 +163,7 @@ class SpacesContext implements Context {
* @throws Exception
*/
public function getSpaceByNameFromResponse(string $name): array {
$response = json_decode($this->featureContext->getResponse()->getBody(), true, 512, JSON_THROW_ON_ERROR);
$response = json_decode((string)$this->featureContext->getResponse()->getBody(), true, 512, JSON_THROW_ON_ERROR);
$spaceAsArray = $response;
if (isset($response['name']) && $response['name'] === $name) {
return $response;

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* ownCloud
*