diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 100% rename from .php_cs.dist rename to .php-cs-fixer.dist.php diff --git a/composer.json b/composer.json index 30c4726ff..7bf463588 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "roave/security-advisories": "dev-master", "christophwurst/nextcloud": "^21@dev", "phpunit/phpunit": "^9", - "nextcloud/coding-standard": "^0.5.0", + "nextcloud/coding-standard": "^1.0.0", "symfony/event-dispatcher": "^4.0", "vimeo/psalm": "^4.3", "php-parallel-lint/php-parallel-lint": "^1.2" diff --git a/composer.lock b/composer.lock index c13be7344..08f9378c0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a0790d53bb2ac2b986da29725be859f1", + "content-hash": "1f6d91406db4e7e16e31113951986e13", "packages": [ { "name": "cogpowered/finediff", @@ -921,85 +921,65 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", + "composer/semver": "^3.2", + "composer/xdebug-handler": "^2.0", + "doctrine/annotations": "^1.12", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "php": "^7.2.5 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", + "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", + "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.23", + "symfony/polyfill-php81": "^1.23", + "symfony/process": "^4.4.20 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.5", + "mikey179/vfsstream": "^1.6.8", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunit/phpunit": "^8.5.21 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "symfony/phpunit-bridge": "^5.2.4 || ^6.0", + "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1018,7 +998,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" }, "funding": [ { @@ -1026,7 +1006,7 @@ "type": "github" } ], - "time": "2021-11-15T17:17:55+00:00" + "time": "2021-12-11T16:25:08+00:00" }, { "name": "myclabs/deep-copy", @@ -1136,21 +1116,21 @@ }, { "name": "nextcloud/coding-standard", - "version": "v0.5.0", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "742ed895ae76c10daf95e08488cfb3f554199f40" + "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/742ed895ae76c10daf95e08488cfb3f554199f40", - "reference": "742ed895ae76c10daf95e08488cfb3f554199f40", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/f3d1f9375e89c605deb1734f59a9f51ecbe80578", + "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^2.17", - "php": "^7.2|^8.0" + "friendsofphp/php-cs-fixer": "^3.2", + "php": "^7.3|^8.0" }, "type": "library", "autoload": { @@ -1171,9 +1151,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v0.5.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.0.0" }, - "time": "2021-01-11T14:15:58+00:00" + "time": "2021-11-10T08:44:10+00:00" }, { "name": "nikic/php-parser", @@ -1397,16 +1377,16 @@ }, { "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", "shasum": "" }, "require": { @@ -1434,21 +1414,18 @@ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" } ], - "description": "sebastian/diff v2 backport support for PHP5.6", + "description": "sebastian/diff v3 backport support for PHP 5.6+", "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ "diff" ], "support": { "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" }, - "time": "2020-10-14T08:39:05+00:00" + "time": "2020-10-14T08:32:19+00:00" }, { "name": "php-parallel-lint/php-parallel-lint", @@ -4547,150 +4524,6 @@ ], "time": "2021-05-27T12:26:48+00:00" }, - { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, { "name": "symfony/polyfill-php73", "version": "v1.23.0", @@ -4853,6 +4686,85 @@ ], "time": "2021-07-28T13:41:28+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-21T13:25:03+00:00" + }, { "name": "symfony/process", "version": "v5.4.0", diff --git a/lib/Db/CardMapper.php b/lib/Db/CardMapper.php index 529808f55..699c40a06 100644 --- a/lib/Db/CardMapper.php +++ b/lib/Db/CardMapper.php @@ -265,7 +265,7 @@ class CardMapper extends QBMapper implements IPermissionMapper { public function findOverdue() { $qb = $this->db->getQueryBuilder(); - $qb->select('id','title','duedate','notified') + $qb->select('id', 'title', 'duedate', 'notified') ->from('deck_cards') ->where($qb->expr()->lt('duedate', $qb->createFunction('NOW()'))) ->andWhere($qb->expr()->eq('notified', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL))) @@ -276,7 +276,7 @@ class CardMapper extends QBMapper implements IPermissionMapper { public function findUnexposedDescriptionChances() { $qb = $this->db->getQueryBuilder(); - $qb->select('id','title','duedate','notified','description_prev','last_editor','description') + $qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description') ->from('deck_cards') ->where($qb->expr()->isNotNull('last_editor')) ->andWhere($qb->expr()->isNotNull('description_prev')); diff --git a/lib/Search/CardSearchResultEntry.php b/lib/Search/CardSearchResultEntry.php index 4bf2f9b51..a7369b56c 100644 --- a/lib/Search/CardSearchResultEntry.php +++ b/lib/Search/CardSearchResultEntry.php @@ -33,6 +33,6 @@ use OCP\Search\SearchResultEntry; class CardSearchResultEntry extends SearchResultEntry { public function __construct(Board $board, Stack $stack, Card $card, $urlGenerator) { - parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle() , $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck'); + parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle(), $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck'); } } diff --git a/lib/Service/OverviewService.php b/lib/Service/OverviewService.php index a54d9b224..a8bb3990f 100644 --- a/lib/Service/OverviewService.php +++ b/lib/Service/OverviewService.php @@ -138,7 +138,7 @@ class OverviewService { private function findAllBoardsFromUser(string $userId): array { $userInfo = $this->getBoardPrerequisites($userId); $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null); - $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null); + $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null); $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null); return array_unique(array_merge($userBoards, $groupBoards, $circleBoards)); } diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index 5e6655cd6..6ac48ea8c 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -500,7 +500,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider { ); } - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); $qb->orderBy('s.id'); diff --git a/tests/integration/database/BoardDatabaseTest.php b/tests/integration/database/BoardDatabaseTest.php index d86b558df..80d0e111f 100644 --- a/tests/integration/database/BoardDatabaseTest.php +++ b/tests/integration/database/BoardDatabaseTest.php @@ -70,7 +70,7 @@ class BoardDatabaseTest extends \Test\TestCase { $board->setOwner(self::TEST_USER1); $board->setColor('000000'); $board->setLabels([]); - $created = $this->boardService->create('Test', self::TEST_USER1, '000000'); + $created = $this->boardService->create('Test', self::TEST_USER1, '000000'); $id = $created->getId(); $actual = $this->boardService->find($id); $this->assertEquals($actual->getTitle(), $board->getTitle()); diff --git a/tests/unit/Db/AclMapperTest.php b/tests/unit/Db/AclMapperTest.php index f720fdb1a..7272e5626 100644 --- a/tests/unit/Db/AclMapperTest.php +++ b/tests/unit/Db/AclMapperTest.php @@ -65,10 +65,10 @@ class AclMapperTest extends MapperTestUtility { $this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3')) ]; $this->acls = [ - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())), - $this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId())) + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId())) ]; foreach ($this->acls as $acl) { diff --git a/tests/unit/Db/BoardMapperTest.php b/tests/unit/Db/BoardMapperTest.php index 43060db79..e0dd8a8c0 100644 --- a/tests/unit/Db/BoardMapperTest.php +++ b/tests/unit/Db/BoardMapperTest.php @@ -74,10 +74,10 @@ class BoardMapperTest extends MapperTestUtility { $this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3')) ]; $this->acls = [ - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())), - $this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId())) + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId())) ]; foreach ($this->acls as $acl) { diff --git a/tests/unit/Service/AttachmentServiceTest.php b/tests/unit/Service/AttachmentServiceTest.php index d76bb2c52..5fa5d73cc 100644 --- a/tests/unit/Service/AttachmentServiceTest.php +++ b/tests/unit/Service/AttachmentServiceTest.php @@ -176,9 +176,9 @@ class AttachmentServiceTest extends TestCase { public function testFindAll() { $this->mockPermission(Acl::PERMISSION_READ); $attachments = [ - $this->createAttachment('deck_file','file1'), - $this->createAttachment('deck_file','file2'), - $this->createAttachment('deck_file_invalid','file3'), + $this->createAttachment('deck_file', 'file1'), + $this->createAttachment('deck_file', 'file2'), + $this->createAttachment('deck_file_invalid', 'file3'), ]; $this->attachmentMapper->expects($this->once()) ->method('findAll') @@ -197,14 +197,14 @@ class AttachmentServiceTest extends TestCase { public function testFindAllWithDeleted() { $this->mockPermission(Acl::PERMISSION_READ); $attachments = [ - $this->createAttachment('deck_file','file1'), - $this->createAttachment('deck_file','file2'), - $this->createAttachment('deck_file_invalid','file3'), + $this->createAttachment('deck_file', 'file1'), + $this->createAttachment('deck_file', 'file2'), + $this->createAttachment('deck_file_invalid', 'file3'), ]; $attachmentsDeleted = [ - $this->createAttachment('deck_file','file4'), - $this->createAttachment('deck_file','file5'), - $this->createAttachment('deck_file_invalid','file6'), + $this->createAttachment('deck_file', 'file4'), + $this->createAttachment('deck_file', 'file5'), + $this->createAttachment('deck_file_invalid', 'file6'), ]; $this->attachmentMapper->expects($this->once()) ->method('findAll') diff --git a/tests/unit/controller/CardControllerTest.php b/tests/unit/controller/CardControllerTest.php index 3effe1e62..82d32ef8d 100644 --- a/tests/unit/controller/CardControllerTest.php +++ b/tests/unit/controller/CardControllerTest.php @@ -98,11 +98,11 @@ class CardControllerTest extends TestCase { } public function testAssignLabel() { $this->cardService->expects($this->once())->method('assignLabel'); - $this->controller->assignLabel(1,2); + $this->controller->assignLabel(1, 2); } public function testRemoveLabel() { $this->cardService->expects($this->once())->method('removeLabel'); - $this->controller->removeLabel(1,2); + $this->controller->removeLabel(1, 2); } public function testReorder() {