aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:53:40 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:54:22 +0200
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /apps/provisioning_api
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
downloadnextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz
nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r--apps/provisioning_api/lib/AppInfo/Application.php4
-rw-r--r--apps/provisioning_api/lib/Controller/GroupsController.php6
-rw-r--r--apps/provisioning_api/tests/Controller/GroupsControllerTest.php6
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php8
4 files changed, 12 insertions, 12 deletions
diff --git a/apps/provisioning_api/lib/AppInfo/Application.php b/apps/provisioning_api/lib/AppInfo/Application.php
index 96ec5242ee0..6d99c48be5d 100644
--- a/apps/provisioning_api/lib/AppInfo/Application.php
+++ b/apps/provisioning_api/lib/AppInfo/Application.php
@@ -43,7 +43,7 @@ class Application extends App {
$container = $this->getContainer();
$server = $container->getServer();
- $container->registerService(NewUserMailHelper::class, function(SimpleContainer $c) use ($server) {
+ $container->registerService(NewUserMailHelper::class, function (SimpleContainer $c) use ($server) {
return new NewUserMailHelper(
$server->query(Defaults::class),
$server->getURLGenerator(),
@@ -56,7 +56,7 @@ class Application extends App {
Util::getDefaultEmailAddress('no-reply')
);
});
- $container->registerService('ProvisioningApiMiddleware', function(SimpleContainer $c) use ($server) {
+ $container->registerService('ProvisioningApiMiddleware', function (SimpleContainer $c) use ($server) {
$user = $server->getUserManager()->get($c['UserId']);
$isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false;
$isSubAdmin = $user !== null ? $server->getGroupManager()->getSubAdmin()->isSubAdmin($user) : false;
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php
index 6d02dcc0cd6..aa774506853 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -93,7 +93,7 @@ class GroupsController extends AUserData {
*/
public function getGroups(string $search = '', int $limit = null, int $offset = 0): DataResponse {
$groups = $this->groupManager->search($search, $limit, $offset);
- $groups = array_map(function($group) {
+ $groups = array_map(function ($group) {
/** @var IGroup $group */
return $group->getGID();
}, $groups);
@@ -113,7 +113,7 @@ class GroupsController extends AUserData {
*/
public function getGroupsDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse {
$groups = $this->groupManager->search($search, $limit, $offset);
- $groups = array_map(function($group) {
+ $groups = array_map(function ($group) {
/** @var IGroup $group */
return [
'id' => $group->getGID(),
@@ -166,7 +166,7 @@ class GroupsController extends AUserData {
if($this->groupManager->isAdmin($user->getUID())
|| $isSubadminOfGroup) {
$users = $this->groupManager->get($groupId)->getUsers();
- $users = array_map(function($user) {
+ $users = array_map(function ($user) {
/** @var IUser $user */
return $user->getUID();
}, $users);
diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
index f5969c01526..0469fee0f71 100644
--- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
@@ -168,7 +168,7 @@ class GroupsControllerTest extends \Test\TestCase {
$this->subAdminManager
->method('isSubAdminOfGroup')
- ->willReturnCallback(function($_user, $_group) use ($user, $group) {
+ ->willReturnCallback(function ($_user, $_group) use ($user, $group) {
if ($_user === $user && $_group === $group) {
return true;
}
@@ -179,7 +179,7 @@ class GroupsControllerTest extends \Test\TestCase {
private function useAccountManager() {
$this->accountManager->expects($this->any())
->method('getUser')
- ->willReturnCallback(function(IUser $user) {
+ ->willReturnCallback(function (IUser $user) {
return [
AccountManager::PROPERTY_PHONE => ['value' => '0800-call-' . $user->getUID()],
AccountManager::PROPERTY_ADDRESS => ['value' => 'Holzweg 99, 0601 Herrera, Panama'],
@@ -496,7 +496,7 @@ class GroupsControllerTest extends \Test\TestCase {
$this->userManager->expects($this->any())
->method('get')
- ->willReturnCallback(function(string $uid) use ($users) {
+ ->willReturnCallback(function (string $uid) use ($users) {
return isset($users[$uid]) ? $users[$uid] : null;
});
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index a5a79c23ebd..aff12547ec0 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -439,7 +439,7 @@ class UsersControllerTest extends TestCase {
$this->config
->expects($this->any())
->method('getAppValue')
- ->willReturnCallback(function($appid, $key, $default) {
+ ->willReturnCallback(function ($appid, $key, $default) {
if($key === 'newUser.generateUserID') {
return 'yes';
}
@@ -477,7 +477,7 @@ class UsersControllerTest extends TestCase {
$this->secureRandom->expects($this->any())
->method('generate')
->with(10)
- ->willReturnCallback(function() { return (string)rand(1000000000, 9999999999); });
+ ->willReturnCallback(function () { return (string)rand(1000000000, 9999999999); });
$this->assertTrue(key_exists(
'id',
@@ -494,7 +494,7 @@ class UsersControllerTest extends TestCase {
$this->config
->expects($this->any())
->method('getAppValue')
- ->willReturnCallback(function($appid, $key, $default) {
+ ->willReturnCallback(function ($appid, $key, $default) {
if($key === 'newUser.generateUserID') {
return 'yes';
}
@@ -537,7 +537,7 @@ class UsersControllerTest extends TestCase {
$this->config
->expects($this->any())
->method('getAppValue')
- ->willReturnCallback(function($appid, $key, $default) {
+ ->willReturnCallback(function ($appid, $key, $default) {
if($key === 'newUser.requireEmail') {
return 'yes';
}