Fix unit tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-03-06 11:56:44 +01:00
parent e828bfca1e
commit fee02bbcaa
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
3 changed files with 7 additions and 8 deletions

View File

@ -37,8 +37,8 @@ use OCP\L10N\IFactory as L10nFactory;
class GroupProvider implements IProvider {
public const ADDED_TO_GROUP = 'group_added';
public const REMOVED_FROM_GROUP = 'group_removed';
const ADDED_TO_GROUP = 'group_added';
const REMOVED_FROM_GROUP = 'group_removed';
/** @var L10nFactory */
private $l10n;
@ -132,7 +132,7 @@ class GroupProvider implements IProvider {
* @param array $parameters
* @throws \InvalidArgumentException
*/
protected function setSubjects(IEvent $event, string $subject, array $parameters): void {
protected function setSubjects(IEvent $event, string $subject, array $parameters) {
$placeholders = $replacements = [];
foreach ($parameters as $placeholder => $parameter) {
$placeholders[] = '{' . $placeholder . '}';

View File

@ -44,7 +44,6 @@ use OCP\AppFramework\App;
use OCP\Defaults;
use OCP\IContainer;
use OCP\IGroup;
use OCP\ILogger;
use OCP\IUser;
use OCP\Settings\IManager;
use OCP\Util;
@ -136,14 +135,14 @@ class Application extends App {
Util::connectHook('\OCP\Config', 'js', $this, 'extendJsConfig');
}
public function addUserToGroup(IGroup $group, IUser $user): void {
public function addUserToGroup(IGroup $group, IUser $user) {
/** @var Hooks $hooks */
$hooks = $this->getContainer()->query(Hooks::class);
$hooks->addUserToGroup($group, $user);
}
public function removeUserFromGroup(IGroup $group, IUser $user): void {
public function removeUserFromGroup(IGroup $group, IUser $user) {
/** @var Hooks $hooks */
$hooks = $this->getContainer()->query(Hooks::class);
$hooks->removeUserFromGroup($group, $user);

View File

@ -224,7 +224,7 @@ class Hooks {
* @throws \InvalidArgumentException
* @throws \BadMethodCallException
*/
public function addUserToGroup(IGroup $group, IUser $user): void {
public function addUserToGroup(IGroup $group, IUser $user) {
$subAdminManager = $this->groupManager->getSubAdmin();
$usersToNotify = $subAdminManager->getGroupsSubAdmins($group);
$usersToNotify[] = $user;
@ -261,7 +261,7 @@ class Hooks {
* @throws \InvalidArgumentException
* @throws \BadMethodCallException
*/
public function removeUserFromGroup(IGroup $group, IUser $user): void {
public function removeUserFromGroup(IGroup $group, IUser $user) {
$subAdminManager = $this->groupManager->getSubAdmin();
$usersToNotify = $subAdminManager->getGroupsSubAdmins($group);
$usersToNotify[] = $user;