mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01:00
Fix scrutinizer issues
* PHPDoc * Proper array initialization
This commit is contained in:
@@ -46,7 +46,7 @@ abstract class TestCase extends \Test\TestCase {
|
||||
/**
|
||||
* Generates a temp user
|
||||
* @param int $num number of users to generate
|
||||
* @return array
|
||||
* @return IUser[]|Iuser
|
||||
*/
|
||||
protected function generateUsers($num = 1) {
|
||||
$users = array();
|
||||
|
||||
@@ -234,7 +234,7 @@ class UsersTest extends TestCase {
|
||||
$user = $this->generateUsers();
|
||||
$user->setDisplayName('foobar');
|
||||
$this->userSession->setUser($user);
|
||||
$params['userid'] = $user->getUID();
|
||||
$params = ['userid' => $user->getUID()];
|
||||
$result = $this->api->getUser($params);
|
||||
$this->assertInstanceOf('OC_OCS_Result', $result);
|
||||
$this->assertTrue($result->succeeded());
|
||||
@@ -261,7 +261,7 @@ class UsersTest extends TestCase {
|
||||
|
||||
public function testGetUserOnOtherUser() {
|
||||
$users = $this->generateUsers(2);
|
||||
$params['userid'] = $users[0];
|
||||
$params = ['userid' => $users[0]->getUID()];
|
||||
$this->userSession->setUser($users[1]);
|
||||
$result = $this->api->getUser($params);
|
||||
$this->assertInstanceOf('OC_OCS_Result', $result);
|
||||
|
||||
Reference in New Issue
Block a user