From e0ce7128964468e3fbf5da048b2f121d3252de38 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 16 Nov 2022 14:02:10 +0545 Subject: [PATCH] Implement owncloud/coding-standard 4 --- .php-cs-fixer.dist.php | 11 ++++------- appinfo/Migrations/Version20161122092159.php | 1 - appinfo/Migrations/Version20170724182159.php | 1 - appinfo/Migrations/Version20181022150134.php | 1 - lib/Consumer.php | 1 - lib/Controller/Activities.php | 1 - lib/Controller/EndPoint.php | 1 - lib/Controller/OCSEndPoint.php | 1 - lib/FilesHooksStatic.php | 1 - lib/Formatter/GroupFormatter.php | 1 - lib/Formatter/UrlFormatter.php | 1 - lib/Hooks.php | 1 - lib/HtmlTextParser.php | 1 - lib/Parameter/IParameter.php | 1 - lib/PersonalPanel.php | 1 - lib/PlainTextParser.php | 1 - lib/ViewInfoCache.php | 1 - templates/stream.app.navigation.php | 8 ++++---- tests/acceptance/features/lib/ActivityPage.php | 1 - tests/unit/Formatter/BaseFormatterTest.php | 1 - tests/unit/Formatter/GroupFormatterTest.php | 1 - tests/unit/Formatter/UrlFormatterTest.php | 1 - tests/unit/Formatter/UserFormatterTest.php | 1 - tests/unit/MailQueueHandlerTest.php | 1 - tests/unit/Parsers/HtmlTextParserTest.php | 1 - vendor-bin/owncloud-codestyle/composer.json | 2 +- 26 files changed, 9 insertions(+), 35 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index f1caedfd..6bb20e04 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,11 +1,8 @@ notPath('templates/html.notification.php') + ->in(__DIR__); $config = new OC\CodingStandard\Config(); - -$config - ->setUsingCache(true) - ->getFinder() - ->in(__DIR__); - +$config->setFinder($finder); return $config; - diff --git a/appinfo/Migrations/Version20161122092159.php b/appinfo/Migrations/Version20161122092159.php index 7b1db6de..24cfb1dc 100644 --- a/appinfo/Migrations/Version20161122092159.php +++ b/appinfo/Migrations/Version20161122092159.php @@ -8,7 +8,6 @@ use OCP\Migration\ISchemaMigration; class Version20161122092159 implements ISchemaMigration { - /** * @param Schema $schema * @param array $options diff --git a/appinfo/Migrations/Version20170724182159.php b/appinfo/Migrations/Version20170724182159.php index 3396a791..2e45d8ff 100644 --- a/appinfo/Migrations/Version20170724182159.php +++ b/appinfo/Migrations/Version20170724182159.php @@ -11,7 +11,6 @@ */ class Version20170724182159 implements ISchemaMigration { - /** * @param Schema $schema * @param array $options diff --git a/appinfo/Migrations/Version20181022150134.php b/appinfo/Migrations/Version20181022150134.php index bd36b465..37ddc330 100644 --- a/appinfo/Migrations/Version20181022150134.php +++ b/appinfo/Migrations/Version20181022150134.php @@ -34,7 +34,6 @@ * */ class Version20181022150134 implements ISqlMigration { - /** * @param Schema $schema * @param array $options diff --git a/lib/Consumer.php b/lib/Consumer.php index 915d7db7..d6e59fb5 100644 --- a/lib/Consumer.php +++ b/lib/Consumer.php @@ -28,7 +28,6 @@ use OCP\L10N\IFactory; class Consumer implements IConsumer { - /** @var Data */ protected $data; diff --git a/lib/Controller/Activities.php b/lib/Controller/Activities.php index 32f290f1..bd4ae6de 100644 --- a/lib/Controller/Activities.php +++ b/lib/Controller/Activities.php @@ -29,7 +29,6 @@ use OCP\IRequest; class Activities extends Controller { - /** @var \OCA\Activity\Data */ protected $data; diff --git a/lib/Controller/EndPoint.php b/lib/Controller/EndPoint.php index 561f06f2..7ea93578 100644 --- a/lib/Controller/EndPoint.php +++ b/lib/Controller/EndPoint.php @@ -27,7 +27,6 @@ use OCP\IRequest; class EndPoint extends Controller { - /** @var OCSEndPoint */ protected $ocsEndPoint; diff --git a/lib/Controller/OCSEndPoint.php b/lib/Controller/OCSEndPoint.php index f2836911..9f5c5480 100644 --- a/lib/Controller/OCSEndPoint.php +++ b/lib/Controller/OCSEndPoint.php @@ -37,7 +37,6 @@ use OCP\IUserSession; class OCSEndPoint { - /** @var string */ protected $filter; diff --git a/lib/FilesHooksStatic.php b/lib/FilesHooksStatic.php index 1aab6fd9..9df3aa76 100755 --- a/lib/FilesHooksStatic.php +++ b/lib/FilesHooksStatic.php @@ -28,7 +28,6 @@ * The class to handle the filesystem hooks */ class FilesHooksStatic { - /** * @var Appinfo\Application */ diff --git a/lib/Formatter/GroupFormatter.php b/lib/Formatter/GroupFormatter.php index 444e3f96..958270a1 100644 --- a/lib/Formatter/GroupFormatter.php +++ b/lib/Formatter/GroupFormatter.php @@ -26,7 +26,6 @@ use OCP\Util; class GroupFormatter implements IFormatter { - /** @var IGroupManager */ protected $groupManager; diff --git a/lib/Formatter/UrlFormatter.php b/lib/Formatter/UrlFormatter.php index 60dbc847..6e6e3464 100644 --- a/lib/Formatter/UrlFormatter.php +++ b/lib/Formatter/UrlFormatter.php @@ -25,7 +25,6 @@ use OCP\Util; class UrlFormatter implements IFormatter { - /** * Format a list of url parameters into an html a-tag. The parameters have to be provided as json encoded data, i.e. a string. * Allowed values are: diff --git a/lib/Hooks.php b/lib/Hooks.php index 88893c90..cdbae6ad 100755 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -30,7 +30,6 @@ * Handles the stream and mail queue of a user when he is being deleted */ class Hooks { - /** * Delete remaining activities and emails when a user is deleted * diff --git a/lib/HtmlTextParser.php b/lib/HtmlTextParser.php index ef7846bf..9931dc34 100644 --- a/lib/HtmlTextParser.php +++ b/lib/HtmlTextParser.php @@ -25,7 +25,6 @@ use OCP\IURLGenerator; class HtmlTextParser extends PlainTextParser { - /** * @var IURLGenerator */ diff --git a/lib/Parameter/IParameter.php b/lib/Parameter/IParameter.php index 09c7bb3d..83fdbb23 100644 --- a/lib/Parameter/IParameter.php +++ b/lib/Parameter/IParameter.php @@ -22,7 +22,6 @@ namespace OCA\Activity\Parameter; interface IParameter { - /** * A value that is used to check, if the parameter is already in a Collection * @return mixed diff --git a/lib/PersonalPanel.php b/lib/PersonalPanel.php index c610010f..6632147d 100644 --- a/lib/PersonalPanel.php +++ b/lib/PersonalPanel.php @@ -5,7 +5,6 @@ use OCP\Settings\ISettings; class PersonalPanel implements ISettings { - /** @var AppInfo\Application */ protected $app; diff --git a/lib/PlainTextParser.php b/lib/PlainTextParser.php index d0435747..dc5fdcf1 100644 --- a/lib/PlainTextParser.php +++ b/lib/PlainTextParser.php @@ -24,7 +24,6 @@ use OCP\IL10N; class PlainTextParser { - /** @var IL10N */ protected $l; diff --git a/lib/ViewInfoCache.php b/lib/ViewInfoCache.php index d3e149d0..230fed01 100644 --- a/lib/ViewInfoCache.php +++ b/lib/ViewInfoCache.php @@ -25,7 +25,6 @@ use OCP\Files\NotFoundException; class ViewInfoCache { - /** @var array */ protected $cachePath; /** @var array */ diff --git a/templates/stream.app.navigation.php b/templates/stream.app.navigation.php index fc378073..daf800d9 100644 --- a/templates/stream.app.navigation.php +++ b/templates/stream.app.navigation.php @@ -8,22 +8,22 @@ ?>
$navigationEntries) { - ?> + ?> + } ?>
diff --git a/tests/acceptance/features/lib/ActivityPage.php b/tests/acceptance/features/lib/ActivityPage.php index 53493488..7845e6f7 100644 --- a/tests/acceptance/features/lib/ActivityPage.php +++ b/tests/acceptance/features/lib/ActivityPage.php @@ -35,7 +35,6 @@ * activity app gets an overhaul, it might require us to have two separate pages. */ class ActivityPage extends OwncloudPage { - /** * * @var string $path diff --git a/tests/unit/Formatter/BaseFormatterTest.php b/tests/unit/Formatter/BaseFormatterTest.php index 86723f0f..c8163f0c 100644 --- a/tests/unit/Formatter/BaseFormatterTest.php +++ b/tests/unit/Formatter/BaseFormatterTest.php @@ -26,7 +26,6 @@ use OCA\Activity\Tests\Unit\TestCase; class BaseFormatterTest extends TestCase { - /** * @param array $methods * @return IFormatter|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/unit/Formatter/GroupFormatterTest.php b/tests/unit/Formatter/GroupFormatterTest.php index 2e39d1cc..d9b4911c 100644 --- a/tests/unit/Formatter/GroupFormatterTest.php +++ b/tests/unit/Formatter/GroupFormatterTest.php @@ -28,7 +28,6 @@ use OCP\IGroupManager; class GroupFormatterTest extends TestCase { - /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; diff --git a/tests/unit/Formatter/UrlFormatterTest.php b/tests/unit/Formatter/UrlFormatterTest.php index c07a45f1..b60598a4 100644 --- a/tests/unit/Formatter/UrlFormatterTest.php +++ b/tests/unit/Formatter/UrlFormatterTest.php @@ -27,7 +27,6 @@ use OCP\Activity\IEvent; class UrlFormatterTest extends TestCase { - /** * @param array $methods * @return IFormatter|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/unit/Formatter/UserFormatterTest.php b/tests/unit/Formatter/UserFormatterTest.php index a14f746a..ea8d745d 100644 --- a/tests/unit/Formatter/UserFormatterTest.php +++ b/tests/unit/Formatter/UserFormatterTest.php @@ -26,7 +26,6 @@ use OCA\Activity\Tests\Unit\TestCase; class UserFormatterTest extends TestCase { - /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; diff --git a/tests/unit/MailQueueHandlerTest.php b/tests/unit/MailQueueHandlerTest.php index 651f1f33..34cb00b9 100644 --- a/tests/unit/MailQueueHandlerTest.php +++ b/tests/unit/MailQueueHandlerTest.php @@ -32,7 +32,6 @@ * @package OCA\Activity\Tests */ class MailQueueHandlerTest extends TestCase { - /** @var MailQueueHandler */ protected $mailQueueHandler; diff --git a/tests/unit/Parsers/HtmlTextParserTest.php b/tests/unit/Parsers/HtmlTextParserTest.php index fd4b0b51..054e6c38 100644 --- a/tests/unit/Parsers/HtmlTextParserTest.php +++ b/tests/unit/Parsers/HtmlTextParserTest.php @@ -8,7 +8,6 @@ use Test\TestCase; class HtmlTextParserTest extends TestCase { - /** * @dataProvider providesMessages * @param string $expected diff --git a/vendor-bin/owncloud-codestyle/composer.json b/vendor-bin/owncloud-codestyle/composer.json index 7326e6cf..e8742c6f 100644 --- a/vendor-bin/owncloud-codestyle/composer.json +++ b/vendor-bin/owncloud-codestyle/composer.json @@ -1,5 +1,5 @@ { "require": { - "owncloud/coding-standard": "^3.0" + "owncloud/coding-standard": "^4.0" } }