mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
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:
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/**
|
||||
* ownCloud
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/**
|
||||
* ownCloud
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user