Merge pull request #5567 from nextcloud/dependabot/composer/nextcloud/coding-standard-1.2.1
This commit is contained in:
24
composer.lock
generated
24
composer.lock
generated
@@ -209,16 +209,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nextcloud/coding-standard",
|
"name": "nextcloud/coding-standard",
|
||||||
"version": "v1.1.1",
|
"version": "v1.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nextcloud/coding-standard.git",
|
"url": "https://github.com/nextcloud/coding-standard.git",
|
||||||
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb"
|
"reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb",
|
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e",
|
||||||
"reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb",
|
"reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -244,9 +244,9 @@
|
|||||||
"description": "Nextcloud coding standards for the php cs fixer",
|
"description": "Nextcloud coding standards for the php cs fixer",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nextcloud/coding-standard/issues",
|
"issues": "https://github.com/nextcloud/coding-standard/issues",
|
||||||
"source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1"
|
"source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1"
|
||||||
},
|
},
|
||||||
"time": "2023-06-01T12:05:01+00:00"
|
"time": "2024-02-01T14:54:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nextcloud/ocp",
|
"name": "nextcloud/ocp",
|
||||||
@@ -464,16 +464,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-cs-fixer/shim",
|
"name": "php-cs-fixer/shim",
|
||||||
"version": "v3.40.2",
|
"version": "v3.49.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHP-CS-Fixer/shim.git",
|
"url": "https://github.com/PHP-CS-Fixer/shim.git",
|
||||||
"reference": "f75393dc76faeecfa5fd4018531faa9b543e9d4e"
|
"reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f75393dc76faeecfa5fd4018531faa9b543e9d4e",
|
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f7d3219cac46632f12362c9aa7c2ac0d2fe92c52",
|
||||||
"reference": "f75393dc76faeecfa5fd4018531faa9b543e9d4e",
|
"reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -510,9 +510,9 @@
|
|||||||
"description": "A tool to automatically fix PHP code style",
|
"description": "A tool to automatically fix PHP code style",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
|
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
|
||||||
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.40.2"
|
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.49.0"
|
||||||
},
|
},
|
||||||
"time": "2023-12-03T09:22:01+00:00"
|
"time": "2024-02-02T00:42:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Activity;
|
namespace OCA\Deck\Activity;
|
||||||
|
|
||||||
use \OCP\Comments\ICommentsEventHandler;
|
|
||||||
use OCA\Deck\Db\CardMapper;
|
use OCA\Deck\Db\CardMapper;
|
||||||
use OCA\Deck\Db\ChangeHelper;
|
use OCA\Deck\Db\ChangeHelper;
|
||||||
use OCA\Deck\Notification\NotificationHelper;
|
use OCA\Deck\Notification\NotificationHelper;
|
||||||
use OCP\Comments\CommentsEvent;
|
use OCP\Comments\CommentsEvent;
|
||||||
use OCP\Comments\IComment;
|
use OCP\Comments\IComment;
|
||||||
|
use OCP\Comments\ICommentsEventHandler;
|
||||||
|
|
||||||
class CommentEventHandler implements ICommentsEventHandler {
|
class CommentEventHandler implements ICommentsEventHandler {
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class DeckProvider implements IProvider {
|
|||||||
* @throws \InvalidArgumentException Should be thrown if your provider does not know this event
|
* @throws \InvalidArgumentException Should be thrown if your provider does not know this event
|
||||||
* @since 11.0.0
|
* @since 11.0.0
|
||||||
*/
|
*/
|
||||||
public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent {
|
public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent {
|
||||||
if ($event->getApp() !== 'deck') {
|
if ($event->getApp() !== 'deck') {
|
||||||
throw new \InvalidArgumentException();
|
throw new \InvalidArgumentException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class BoardController extends ApiController {
|
|||||||
* @param $boardId
|
* @param $boardId
|
||||||
* @return \OCP\AppFramework\Db\Entity
|
* @return \OCP\AppFramework\Db\Entity
|
||||||
*/
|
*/
|
||||||
public function read($boardId) {
|
public function read(int $boardId) {
|
||||||
return $this->boardService->find($boardId);
|
return $this->boardService->find($boardId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Controller;
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
use \OCP\AppFramework\Http\RedirectResponse;
|
|
||||||
use OCA\Deck\Db\Acl;
|
use OCA\Deck\Db\Acl;
|
||||||
use OCA\Deck\Db\CardMapper;
|
use OCA\Deck\Db\CardMapper;
|
||||||
use OCA\Deck\Service\BoardService;
|
use OCA\Deck\Service\BoardService;
|
||||||
@@ -37,6 +36,7 @@ use OCP\AppFramework\Controller;
|
|||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||||
|
use OCP\AppFramework\Http\RedirectResponse;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\AppFramework\Services\IInitialState;
|
use OCP\AppFramework\Services\IInitialState;
|
||||||
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent;
|
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class SessionController extends OCSController {
|
|||||||
|
|
||||||
#[NoAdminRequired]
|
#[NoAdminRequired]
|
||||||
#[NoCSRFRequired]
|
#[NoCSRFRequired]
|
||||||
public function close(int $boardId, string $token = null): DataResponse {
|
public function close(int $boardId, ?string $token = null): DataResponse {
|
||||||
if ($token === null) {
|
if ($token === null) {
|
||||||
return new DataResponse();
|
return new DataResponse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $this->findEntities($qb);
|
return $this->findEntities($qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function search(array $boardIds, SearchQuery $query, int $limit = null, int $offset = null): array {
|
public function search(array $boardIds, SearchQuery $query, ?int $limit = null, ?int $offset = null): array {
|
||||||
$qb = $this->queryCardsByBoards($boardIds);
|
$qb = $this->queryCardsByBoards($boardIds);
|
||||||
$this->extendQueryByFilter($qb, $query);
|
$this->extendQueryByFilter($qb, $query);
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchComments(array $boardIds, SearchQuery $query, int $limit = null, int $offset = null): array {
|
public function searchComments(array $boardIds, SearchQuery $query, ?int $limit = null, ?int $offset = null): array {
|
||||||
if (count($query->getTextTokens()) === 0) {
|
if (count($query->getTextTokens()) === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transferOwnership(string $ownerId, string $newOwnerId, int $boardId = null): void {
|
public function transferOwnership(string $ownerId, string $newOwnerId, ?int $boardId = null): void {
|
||||||
$params = [
|
$params = [
|
||||||
'owner' => $ownerId,
|
'owner' => $ownerId,
|
||||||
'newOwner' => $newOwnerId
|
'newOwner' => $newOwnerId
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use OCA\Deck\Db\Card;
|
|||||||
class CardUpdatedEvent extends ACardEvent {
|
class CardUpdatedEvent extends ACardEvent {
|
||||||
private $cardBefore;
|
private $cardBefore;
|
||||||
|
|
||||||
public function __construct(Card $card, Card $before = null) {
|
public function __construct(Card $card, ?Card $before = null) {
|
||||||
parent::__construct($card);
|
parent::__construct($card);
|
||||||
$this->cardBefore = $before;
|
$this->cardBefore = $before;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class ConfigService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isCalendarEnabled(int $boardId = null): bool {
|
public function isCalendarEnabled(?int $boardId = null): bool {
|
||||||
if ($this->getUserId() === null) {
|
if ($this->getUserId() === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ class ConfigService {
|
|||||||
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
|
return (bool)$this->config->getUserValue($this->getUserId(), Application::APP_ID, 'board:' . $boardId . ':calendar', $defaultState);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isCardDetailsInModal(int $boardId = null): bool {
|
public function isCardDetailsInModal(?int $boardId = null): bool {
|
||||||
if ($this->getUserId() === null) {
|
if ($this->getUserId() === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ class ConfigService {
|
|||||||
return array_filter($groups);
|
return array_filter($groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAttachmentFolder(string $userId = null): string {
|
public function getAttachmentFolder(?string $userId = null): string {
|
||||||
if ($userId === null && $this->getUserId() === null) {
|
if ($userId === null && $this->getUserId() === null) {
|
||||||
throw new NoPermissionException('Must be logged in get the attachment folder');
|
throw new NoPermissionException('Must be logged in get the attachment folder');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class SearchService {
|
|||||||
$this->urlGenerator = $urlGenerator;
|
$this->urlGenerator = $urlGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchCards(string $term, int $limit = null, ?int $cursor = null): array {
|
public function searchCards(string $term, ?int $limit = null, ?int $cursor = null): array {
|
||||||
$boards = $this->boardService->getUserBoards();
|
$boards = $this->boardService->getUserBoards();
|
||||||
$boardIds = array_map(static function (Board $board) {
|
$boardIds = array_map(static function (Board $board) {
|
||||||
return $board->getId();
|
return $board->getId();
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class BoardContext implements Context {
|
|||||||
/**
|
/**
|
||||||
* @When shares the board with user :user
|
* @When shares the board with user :user
|
||||||
*/
|
*/
|
||||||
public function sharesTheBoardWithUser($user, TableNode $permissions = null) {
|
public function sharesTheBoardWithUser($user, ?TableNode $permissions = null) {
|
||||||
$defaults = [
|
$defaults = [
|
||||||
'permissionEdit' => '0',
|
'permissionEdit' => '0',
|
||||||
'permissionShare' => '0',
|
'permissionShare' => '0',
|
||||||
@@ -103,7 +103,7 @@ class BoardContext implements Context {
|
|||||||
/**
|
/**
|
||||||
* @When shares the board with group :group
|
* @When shares the board with group :group
|
||||||
*/
|
*/
|
||||||
public function sharesTheBoardWithGroup($group, TableNode $permissions = null) {
|
public function sharesTheBoardWithGroup($group, ?TableNode $permissions = null) {
|
||||||
$defaults = [
|
$defaults = [
|
||||||
'permissionEdit' => '0',
|
'permissionEdit' => '0',
|
||||||
'permissionShare' => '0',
|
'permissionShare' => '0',
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Service;
|
namespace OCA\Deck\Service;
|
||||||
|
|
||||||
use \Test\TestCase;
|
|
||||||
use OC\L10N\L10N;
|
use OC\L10N\L10N;
|
||||||
use OCA\Deck\Activity\ActivityManager;
|
use OCA\Deck\Activity\ActivityManager;
|
||||||
use OCA\Deck\Db\Acl;
|
use OCA\Deck\Db\Acl;
|
||||||
@@ -51,6 +50,7 @@ use OCP\IURLGenerator;
|
|||||||
use OCP\IUser;
|
use OCP\IUser;
|
||||||
use OCP\IUserManager;
|
use OCP\IUserManager;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
|
use Test\TestCase;
|
||||||
|
|
||||||
class BoardServiceTest extends TestCase {
|
class BoardServiceTest extends TestCase {
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Service;
|
namespace OCA\Deck\Service;
|
||||||
|
|
||||||
use \Test\TestCase;
|
|
||||||
use OCA\Deck\Db\Board;
|
use OCA\Deck\Db\Board;
|
||||||
use OCA\Deck\Db\BoardMapper;
|
use OCA\Deck\Db\BoardMapper;
|
||||||
use OCA\Deck\Db\Card;
|
use OCA\Deck\Db\Card;
|
||||||
use OCA\Deck\Db\Stack;
|
use OCA\Deck\Db\Stack;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
|
use Test\TestCase;
|
||||||
|
|
||||||
class DefaultBoardServiceTest extends TestCase {
|
class DefaultBoardServiceTest extends TestCase {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Service;
|
namespace OCA\Deck\Service;
|
||||||
|
|
||||||
use \Test\TestCase;
|
|
||||||
use OCA\Deck\Activity\ActivityManager;
|
use OCA\Deck\Activity\ActivityManager;
|
||||||
use OCA\Deck\Db\AssignmentMapper;
|
use OCA\Deck\Db\AssignmentMapper;
|
||||||
use OCA\Deck\Db\BoardMapper;
|
use OCA\Deck\Db\BoardMapper;
|
||||||
@@ -38,6 +37,7 @@ use OCA\Deck\Model\CardDetails;
|
|||||||
use OCA\Deck\Validators\StackServiceValidator;
|
use OCA\Deck\Validators\StackServiceValidator;
|
||||||
use OCP\EventDispatcher\IEventDispatcher;
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
use Test\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class StackServiceTest
|
* Class StackServiceTest
|
||||||
|
|||||||
Reference in New Issue
Block a user