Fix code style

Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
This commit is contained in:
Sergey Shliakhov
2020-06-07 16:18:38 +02:00
committed by Julius Härtl
parent 118959795f
commit b8b3ac3516
7 changed files with 83 additions and 96 deletions

View File

@@ -9,11 +9,9 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
final class TransferOwnership extends Command { final class TransferOwnership extends Command {
protected $boardService; protected $boardService;
public function __construct(BoardService $boardService) public function __construct(BoardService $boardService) {
{
parent::__construct(); parent::__construct();
$this->boardService = $boardService; $this->boardService = $boardService;
@@ -45,5 +43,4 @@ final class TransferOwnership extends Command {
$output->writeln("Transfer deck entities from $owner to $newOwner completed"); $output->writeln("Transfer deck entities from $owner to $newOwner completed");
} }
} }

View File

@@ -63,8 +63,7 @@ class AclMapper extends DeckMapper implements IPermissionMapper {
* @param $newOwnerId * @param $newOwnerId
* @return void * @return void
*/ */
public function transferOwnership($ownerId, $newOwnerId) public function transferOwnership($ownerId, $newOwnerId) {
{
$params = [ $params = [
'owner' => $ownerId, 'owner' => $ownerId,
'newOwner' => $newOwnerId, 'newOwner' => $newOwnerId,

View File

@@ -152,8 +152,7 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
* @param $newOwnerId * @param $newOwnerId
* @return void * @return void
*/ */
public function transferOwnership($ownerId, $newOwnerId) public function transferOwnership($ownerId, $newOwnerId) {
{
$params = [ $params = [
'owner' => $ownerId, 'owner' => $ownerId,
'newOwner' => $newOwnerId 'newOwner' => $newOwnerId

View File

@@ -309,8 +309,7 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
* @param $newOwnerId * @param $newOwnerId
* @return void * @return void
*/ */
public function transferOwnership($ownerId, $newOwnerId) public function transferOwnership($ownerId, $newOwnerId) {
{
$params = [ $params = [
'owner' => $ownerId, 'owner' => $ownerId,
'newOwner' => $newOwnerId 'newOwner' => $newOwnerId

View File

@@ -570,8 +570,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
* @param $newOwnerId * @param $newOwnerId
* @return void * @return void
*/ */
public function transferOwnership($ownerId, $newOwnerId) public function transferOwnership($ownerId, $newOwnerId) {
{
$params = [ $params = [
'owner' => $ownerId, 'owner' => $ownerId,
'newOwner' => $newOwnerId 'newOwner' => $newOwnerId

View File

@@ -680,8 +680,7 @@ class BoardService {
* @param $newOwnerId * @param $newOwnerId
* @return void * @return void
*/ */
public function transferOwnership($owner, $newOwner) public function transferOwnership($owner, $newOwner) {
{
$this->boardMapper->transferOwnership($owner, $newOwner); $this->boardMapper->transferOwnership($owner, $newOwner);
$this->assignedUsersMapper->transferOwnership($owner, $newOwner); $this->assignedUsersMapper->transferOwnership($owner, $newOwner);
$this->aclMapper->transferOwnership($owner, $newOwner); $this->aclMapper->transferOwnership($owner, $newOwner);

View File

@@ -76,8 +76,7 @@ class AssignedUsersMapperTest extends \Test\TestCase {
/** /**
* @covers ::transferOwnership * @covers ::transferOwnership
*/ */
public function testTransferBoardOwnership() public function testTransferBoardOwnership() {
{
$this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER); $this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER);
$board = $this->boardService->find($this->board->getId()); $board = $this->boardService->find($this->board->getId());
$boardOwner = $board->getOwner(); $boardOwner = $board->getOwner();
@@ -87,8 +86,7 @@ class AssignedUsersMapperTest extends \Test\TestCase {
/** /**
* @covers ::transferOwnership * @covers ::transferOwnership
*/ */
public function testTransferACLOwnership() public function testTransferACLOwnership() {
{
$this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER); $this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER);
$board = $this->boardService->find($this->board->getId()); $board = $this->boardService->find($this->board->getId());
$acl = $board->getAcl(); $acl = $board->getAcl();
@@ -101,8 +99,7 @@ class AssignedUsersMapperTest extends \Test\TestCase {
/** /**
* @covers ::transferOwnership * @covers ::transferOwnership
*/ */
public function testNoTransferAclOwnershipIfGroupType() public function testNoTransferAclOwnershipIfGroupType() {
{
$this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER); $this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER);
$board = $this->boardService->find($this->board->getId()); $board = $this->boardService->find($this->board->getId());
$acl = $board->getAcl(); $acl = $board->getAcl();
@@ -114,8 +111,7 @@ class AssignedUsersMapperTest extends \Test\TestCase {
/** /**
* @covers ::transferOwnership * @covers ::transferOwnership
*/ */
public function testTransferCardOwnership() public function testTransferCardOwnership() {
{
$this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER); $this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER);
$card = $this->cardService->find($this->cards[0]->getId()); $card = $this->cardService->find($this->cards[0]->getId());
$cardOwner = $card->getOwner(); $cardOwner = $card->getOwner();
@@ -125,8 +121,7 @@ class AssignedUsersMapperTest extends \Test\TestCase {
/** /**
* @covers ::transferOwnership * @covers ::transferOwnership
*/ */
public function testReassignCardToNewOwner() public function testReassignCardToNewOwner() {
{
$this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER); $this->boardService->transferOwnership(self::TEST_OWNER, self::TEST_NEW_OWNER);
$assignedUsers = $this->assignedUsersMapper->find($this->cards[0]->getId()); $assignedUsers = $this->assignedUsersMapper->find($this->cards[0]->getId());
$participantsUIDs = []; $participantsUIDs = [];