Merge pull request #328 from opencloud-eu/fixGherkinLintAndPhpStandart

Fix gherkin lint
This commit is contained in:
Viktor Scharf
2025-03-10 15:58:04 +01:00
committed by GitHub
9 changed files with 10 additions and 8 deletions
@@ -33,6 +33,7 @@ class UploadHelper extends Assert {
/** /**
* *
* @param string|null $baseUrl URL of OpenCloud * @param string|null $baseUrl URL of OpenCloud
* @param string|null $user
* @param string|null $password * @param string|null $password
* @param string|null $source * @param string|null $source
* @param string|null $destination * @param string|null $destination
@@ -750,7 +750,9 @@ class FeatureContext extends BehatVariablesContext {
*/ */
public function getStorageUsersRoot(): string { public function getStorageUsersRoot(): string {
$ocDataPath = getenv("OC_BASE_DATA_PATH") ? getenv("OC_BASE_DATA_PATH") : getenv("HOME") . '/.opencloud'; $ocDataPath = getenv("OC_BASE_DATA_PATH") ? getenv("OC_BASE_DATA_PATH") : getenv("HOME") . '/.opencloud';
return getenv("STORAGE_USERS_DECOMPOSED_ROOT") ? getenv("STORAGE_USERS_DECOMPOSED_ROOT") : $ocDataPath . "/storage/users"; return getenv("STORAGE_USERS_DECOMPOSED_ROOT")
? getenv("STORAGE_USERS_DECOMPOSED_ROOT")
: $ocDataPath . "/storage/users";
} }
/** /**
+2 -2
View File
@@ -182,10 +182,10 @@ class SearchContext implements Context {
$property['value'], $property['value'],
$user $user
); );
if (is_object($fileResult)) { if (\is_object($fileResult)) {
$fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']); $fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']);
} else { } else {
throw new Exception("Expected fileResult to be an object, but found " . gettype($fileResult)); throw new Exception("Expected fileResult to be an object, but found " . \gettype($fileResult));
} }
if ($fileResultProperty) { if ($fileResultProperty) {
Assert::assertMatchesRegularExpression( Assert::assertMatchesRegularExpression(
@@ -37,7 +37,6 @@ class ShareesContext implements Context {
private FeatureContext $featureContext; private FeatureContext $featureContext;
private OCSContext $ocsContext; private OCSContext $ocsContext;
/** /**
* @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/ * @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/
* *
-1
View File
@@ -1654,7 +1654,6 @@ trait Sharing {
$this->setResponse($this->getAllShares($user, "?path=$path")); $this->setResponse($this->getAllShares($user, "?path=$path"));
} }
/** /**
* @Then /^the last share_id should be included in the response/ * @Then /^the last share_id should be included in the response/
* *
@@ -6,6 +6,7 @@ Feature: get applications
Background: Background:
Given user "Alice" has been created with default attributes Given user "Alice" has been created with default attributes
Scenario Outline: admin user lists all the groups Scenario Outline: admin user lists all the groups
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" gets all applications using the Graph API When user "Alice" gets all applications using the Graph API