Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 14:53:40 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 14:54:22 +0300
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /build
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/AppConfiguration.php2
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php2
-rw-r--r--build/integration/features/bootstrap/CalDavContext.php2
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php2
-rw-r--r--build/integration/features/bootstrap/CardDavContext.php6
-rw-r--r--build/integration/features/bootstrap/CommandLine.php2
-rw-r--r--build/integration/features/bootstrap/CommandLineContext.php6
-rw-r--r--build/integration/features/bootstrap/FederationContext.php6
-rw-r--r--build/integration/features/bootstrap/Sharing.php30
-rw-r--r--build/license.php10
10 files changed, 34 insertions, 34 deletions
diff --git a/build/integration/features/bootstrap/AppConfiguration.php b/build/integration/features/bootstrap/AppConfiguration.php
index 23ce2f89d04..87ecce24659 100644
--- a/build/integration/features/bootstrap/AppConfiguration.php
+++ b/build/integration/features/bootstrap/AppConfiguration.php
@@ -96,7 +96,7 @@ trait AppConfiguration {
* reset the configs before each scenario
* @param BeforeScenarioScope $event
*/
- public function prepareParameters(BeforeScenarioScope $event){
+ public function prepareParameters(BeforeScenarioScope $event) {
$user = $this->currentUser;
$this->currentUser = 'admin';
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index 03cdd58833e..6a42cc1915d 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -370,7 +370,7 @@ trait BasicStructure {
private function getDataDirectory() {
// Based on "runOcc" from CommandLine trait
$args = ['config:system:get', 'datadirectory'];
- $args = array_map(function($arg) {
+ $args = array_map(function ($arg) {
return escapeshellarg($arg);
}, $args);
$args[] = '--no-ansi --no-warnings';
diff --git a/build/integration/features/bootstrap/CalDavContext.php b/build/integration/features/bootstrap/CalDavContext.php
index 13794df851a..b7b099b9850 100644
--- a/build/integration/features/bootstrap/CalDavContext.php
+++ b/build/integration/features/bootstrap/CalDavContext.php
@@ -80,7 +80,7 @@ class CalDavContext implements \Behat\Behat\Context\Context {
* @param string $calendar
* @param string $endpoint
*/
- public function requestsCalendar($user, $calendar, $endpoint) {
+ public function requestsCalendar($user, $calendar, $endpoint) {
$davUrl = $this->baseUrl . $endpoint . $calendar;
$password = ($user === 'admin') ? 'admin' : '123456';
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index f38ba17551a..9f778ea5b5a 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -42,7 +42,7 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
* @Then /^fields of capabilities match with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
*/
- public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData){
+ public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData) {
$capabilitiesXML = simplexml_load_string($this->response->getBody())->data->capabilities;
foreach ($formData->getHash() as $row) {
diff --git a/build/integration/features/bootstrap/CardDavContext.php b/build/integration/features/bootstrap/CardDavContext.php
index 2837634a9d5..3e79c41fd13 100644
--- a/build/integration/features/bootstrap/CardDavContext.php
+++ b/build/integration/features/bootstrap/CardDavContext.php
@@ -206,7 +206,7 @@ class CardDavContext implements \Behat\Behat\Context\Context {
/**
* @Given :user uploads the contact :fileName to the addressbook :addressbook
*/
- public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) {
+ public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) {
$davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName;
$password = ($user === 'admin') ? 'admin' : '123456';
@@ -239,7 +239,7 @@ class CardDavContext implements \Behat\Behat\Context\Context {
/**
* @When Exporting the picture of contact :fileName from addressbook :addressBook as user :user
*/
- public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) {
+ public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) {
$davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName . '?photo=true';
$password = ($user === 'admin') ? 'admin' : '123456';
@@ -265,7 +265,7 @@ class CardDavContext implements \Behat\Behat\Context\Context {
/**
* @When Downloading the contact :fileName from addressbook :addressBook as user :user
*/
- public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) {
+ public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) {
$davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName;
$password = ($user === 'admin') ? 'admin' : '123456';
diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php
index 91aa7028821..85b5b1e7464 100644
--- a/build/integration/features/bootstrap/CommandLine.php
+++ b/build/integration/features/bootstrap/CommandLine.php
@@ -42,7 +42,7 @@ trait CommandLine {
* @return int exit code
*/
public function runOcc($args = []) {
- $args = array_map(function($arg) {
+ $args = array_map(function ($arg) {
return escapeshellarg($arg);
}, $args);
$args[] = '--no-ansi';
diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php
index 5bb87c04a94..678cf40351f 100644
--- a/build/integration/features/bootstrap/CommandLineContext.php
+++ b/build/integration/features/bootstrap/CommandLineContext.php
@@ -42,14 +42,14 @@ class CommandLineContext implements \Behat\Behat\Context\Context {
/**
* @Given Maintenance mode is enabled
*/
- public function maintenanceModeIsEnabled() {
+ public function maintenanceModeIsEnabled() {
$this->runOcc(['maintenance:mode', '--on']);
}
/**
* @Then Maintenance mode is disabled
*/
- public function maintenanceModeIsDisabled() {
+ public function maintenanceModeIsDisabled() {
$this->runOcc(['maintenance:mode', '--off']);
}
@@ -82,7 +82,7 @@ class CommandLineContext implements \Behat\Behat\Context\Context {
return null;
}
- usort($foundPaths, function($a, $b) {
+ usort($foundPaths, function ($a, $b) {
return $a['date'] - $b['date'];
});
diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php
index d710b9e502d..dce62b16c0d 100644
--- a/build/integration/features/bootstrap/FederationContext.php
+++ b/build/integration/features/bootstrap/FederationContext.php
@@ -46,7 +46,7 @@ class FederationContext implements Context, SnippetAcceptingContext {
* @param string $shareeUser
* @param string $shareeServer "LOCAL" or "REMOTE"
*/
- public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer){
+ public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer) {
if ($shareeServer == "REMOTE"){
$shareWith = "$shareeUser@" . substr($this->remoteBaseUrl, 0, -4);
} else {
@@ -67,7 +67,7 @@ class FederationContext implements Context, SnippetAcceptingContext {
* @param string $shareeUser
* @param string $shareeServer "LOCAL" or "REMOTE"
*/
- public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer){
+ public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer) {
if ($shareeServer == "REMOTE"){
$shareWith = "$shareeGroup@" . substr($this->remoteBaseUrl, 0, -4);
} else {
@@ -83,7 +83,7 @@ class FederationContext implements Context, SnippetAcceptingContext {
* @param string $user
* @param string $server
*/
- public function acceptLastPendingShare($user, $server){
+ public function acceptLastPendingShare($user, $server) {
$previous = $this->usingServer($server);
$this->asAn($user);
$this->sendingToWith('GET', "/apps/files_sharing/api/v1/remote_shares/pending", null);
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index b76e846191e..cc08470e987 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -266,7 +266,7 @@ trait Sharing {
$shareWith = null,
$publicUpload = null,
$password = null,
- $permissions = null){
+ $permissions = null) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares";
$client = new Client();
$options = [
@@ -311,7 +311,7 @@ trait Sharing {
}
}
- public function isFieldInResponse($field, $contentExpected){
+ public function isFieldInResponse($field, $contentExpected) {
$data = simplexml_load_string($this->response->getBody())->data[0];
if ((string)$field == 'expiration'){
$contentExpected = date('Y-m-d', strtotime($contentExpected)) . " 00:00:00";
@@ -358,7 +358,7 @@ trait Sharing {
*
* @param string $filename
*/
- public function checkSharedFileInResponse($filename){
+ public function checkSharedFileInResponse($filename) {
Assert::assertEquals(true, $this->isFieldInResponse('file_target', "/$filename"));
}
@@ -367,7 +367,7 @@ trait Sharing {
*
* @param string $filename
*/
- public function checkSharedFileNotInResponse($filename){
+ public function checkSharedFileNotInResponse($filename) {
Assert::assertEquals(false, $this->isFieldInResponse('file_target', "/$filename"));
}
@@ -376,7 +376,7 @@ trait Sharing {
*
* @param string $user
*/
- public function checkSharedUserInResponse($user){
+ public function checkSharedUserInResponse($user) {
Assert::assertEquals(true, $this->isFieldInResponse('share_with', "$user"));
}
@@ -385,11 +385,11 @@ trait Sharing {
*
* @param string $user
*/
- public function checkSharedUserNotInResponse($user){
+ public function checkSharedUserNotInResponse($user) {
Assert::assertEquals(false, $this->isFieldInResponse('share_with', "$user"));
}
- public function isUserOrGroupInSharedData($userOrGroup, $permissions = null){
+ public function isUserOrGroupInSharedData($userOrGroup, $permissions = null) {
$data = simplexml_load_string($this->response->getBody())->data[0];
foreach($data as $element) {
if ($element->share_with == $userOrGroup && ($permissions === null || $permissions == $element->permissions)){
@@ -406,7 +406,7 @@ trait Sharing {
* @param string $user1
* @param string $user2
*/
- public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null){
+ public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath";
$client = new Client();
$options = [];
@@ -435,7 +435,7 @@ trait Sharing {
* @param string $user
* @param string $group
*/
- public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null){
+ public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath";
$client = new Client();
$options = [];
@@ -460,7 +460,7 @@ trait Sharing {
/**
* @When /^Deleting last share$/
*/
- public function deletingLastShare(){
+ public function deletingLastShare() {
$share_id = $this->lastShareData->data[0]->id;
$url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id";
$this->sendingToWith("DELETE", $url, null);
@@ -469,7 +469,7 @@ trait Sharing {
/**
* @When /^Getting info of last share$/
*/
- public function gettingInfoOfLastShare(){
+ public function gettingInfoOfLastShare() {
$share_id = $this->lastShareData->data[0]->id;
$url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id";
$this->sendingToWith("GET", $url, null);
@@ -478,7 +478,7 @@ trait Sharing {
/**
* @Then /^last share_id is included in the answer$/
*/
- public function checkingLastShareIDIsIncluded(){
+ public function checkingLastShareIDIsIncluded() {
$share_id = $this->lastShareData->data[0]->id;
if (!$this->isFieldInResponse('id', $share_id)){
Assert::fail("Share id $share_id not found in response");
@@ -488,7 +488,7 @@ trait Sharing {
/**
* @Then /^last share_id is not included in the answer$/
*/
- public function checkingLastShareIDIsNotIncluded(){
+ public function checkingLastShareIDIsNotIncluded() {
$share_id = $this->lastShareData->data[0]->id;
if ($this->isFieldInResponse('id', $share_id)){
Assert::fail("Share id $share_id has been found in response");
@@ -499,7 +499,7 @@ trait Sharing {
* @Then /^Share fields of last share match with$/
* @param TableNode|null $body
*/
- public function checkShareFields($body){
+ public function checkShareFields($body) {
if ($body instanceof TableNode) {
$fd = $body->getRowsHash();
@@ -601,7 +601,7 @@ trait Sharing {
* @param string $contentExpected
* @param \SimpleXMLElement $returnedShare
*/
- private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare){
+ private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare) {
if ($contentExpected === 'IGNORE') {
return;
}
diff --git a/build/license.php b/build/license.php
index 9a22e915ce2..717ff13c75f 100644
--- a/build/license.php
+++ b/build/license.php
@@ -98,12 +98,12 @@ EOD;
return;
}
- $excludes = array_map(function($item) use ($folder) {
+ $excludes = array_map(function ($item) use ($folder) {
return $folder . '/' . $item;
}, ['vendor', '3rdparty', '.git', 'l10n', 'templates', 'composer']);
$iterator = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS);
- $iterator = new RecursiveCallbackFilterIterator($iterator, function($item) use ($folder, $excludes){
+ $iterator = new RecursiveCallbackFilterIterator($iterator, function ($item) use ($folder, $excludes) {
/** @var SplFileInfo $item */
foreach($excludes as $exclude) {
if (substr($item->getPath(), 0, strlen($exclude)) === $exclude) {
@@ -134,7 +134,7 @@ With help from many libraries and frameworks including:
jQuery
";
- $authors = implode(PHP_EOL, array_map(function($author){
+ $authors = implode(PHP_EOL, array_map(function ($author) {
return " - ".$author;
}, $this->authors));
$template = str_replace('@AUTHORS@', $authors, $template);
@@ -328,7 +328,7 @@ With help from many libraries and frameworks including:
}
$authors = explode(PHP_EOL, $out);
- $authors = array_filter($authors, function($author) {
+ $authors = array_filter($authors, function ($author) {
return !in_array($author, [
'',
'Not Committed Yet <not.committed.yet>',
@@ -342,7 +342,7 @@ With help from many libraries and frameworks including:
$authors = array_unique($authors);
}
- $authors = array_map(function($author){
+ $authors = array_map(function ($author) {
$author = $this->fixInvalidEmail($author);
$this->authors[$author] = $author;
return " * @author $author";