Switch from OC::$server->get to OCP\Server::get

And add a bit more typing to some classes + psalm issues

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan
2022-05-11 11:38:07 +02:00
committed by Julius Härtl
parent 2c7708dab1
commit 44481e1c2a
45 changed files with 1034 additions and 506 deletions

View File

@@ -39,9 +39,11 @@ use OCA\Deck\NoPermissionException;
use OCA\Deck\Notification\NotificationHelper;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IGroupManager;
use PHPUnit\Framework\MockObject\MockObject;
use \Test\TestCase;
use OCP\IURLGenerator;
@@ -80,6 +82,8 @@ class BoardServiceTest extends TestCase {
private $userId = 'admin';
/** @var IURLGenerator */
private $urlGenerator;
/** @var IDBConnection|MockObject */
private $connection;
public function setUp(): void {
parent::setUp();
@@ -99,6 +103,7 @@ class BoardServiceTest extends TestCase {
$this->changeHelper = $this->createMock(ChangeHelper::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->connection = $this->createMock(IDBConnection::class);
$this->service = new BoardService(
$this->boardMapper,
@@ -117,6 +122,7 @@ class BoardServiceTest extends TestCase {
$this->eventDispatcher,
$this->changeHelper,
$this->urlGenerator,
$this->connection,
$this->userId
);