From 44c8cd118caf07ecc6ea0ea5e7bcf882efcc9c41 Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 15 May 2025 07:15:23 +0000 Subject: [PATCH] Fix code style --- src/Core/Addon/AddonInfo.php | 3 +- tests/Unit/Core/Addon/AddonInfoTest.php | 32 +++++++++---------- .../Core/Addon/AddonManagerHelperTest.php | 12 +++---- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/Core/Addon/AddonInfo.php b/src/Core/Addon/AddonInfo.php index 87bb5750f5..60a4b6dc70 100644 --- a/src/Core/Addon/AddonInfo.php +++ b/src/Core/Addon/AddonInfo.php @@ -155,7 +155,8 @@ final class AddonInfo private string $status = ''; - private function __construct() { + private function __construct() + { } public function getId(): string diff --git a/tests/Unit/Core/Addon/AddonInfoTest.php b/tests/Unit/Core/Addon/AddonInfoTest.php index 5e9d2cc79a..20eb654f3a 100644 --- a/tests/Unit/Core/Addon/AddonInfoTest.php +++ b/tests/Unit/Core/Addon/AddonInfoTest.php @@ -41,15 +41,15 @@ class AddonInfoTest extends TestCase */ TEXT, [ - 'id' => 'test', - 'name' => 'Test Addon', + 'id' => 'test', + 'name' => 'Test Addon', 'description' => 'adds awesome features to friendica', 'maintainers' => [ ['name' => 'Robin'], ], 'version' => '100.4.50-beta.5', - 'status' => 'beta', + 'status' => 'beta', ], ], 'without-maintainer' => [ @@ -66,14 +66,14 @@ class AddonInfoTest extends TestCase */ TEXT, [ - 'id' => 'test', - 'name' => 'Test Addon', + 'id' => 'test', + 'name' => 'Test Addon', 'description' => 'adds awesome features to friendica', - 'authors' => [ + 'authors' => [ ['name' => 'Sam'], ], 'version' => '100.4.50-beta.5', - 'status' => 'beta', + 'status' => 'beta', ], ], 'complete' => [ @@ -93,10 +93,10 @@ class AddonInfoTest extends TestCase */ TEXT, [ - 'id' => 'test', - 'name' => 'Test Addon', + 'id' => 'test', + 'name' => 'Test Addon', 'description' => 'adds awesome features to friendica', - 'authors' => [ + 'authors' => [ ['name' => 'Sam'], ['name' => 'Sam With Mail', 'link' => 'mail@example.org'], ], @@ -105,7 +105,7 @@ class AddonInfoTest extends TestCase ['name' => 'Robin With Profile', 'link' => 'https://example.org/profile/robin'], ], 'version' => '100.4.50-beta.5', - 'status' => 'beta', + 'status' => 'beta', ], ], ]; @@ -155,13 +155,13 @@ class AddonInfoTest extends TestCase ); $data = [ - 'id' => $info->getId(), - 'name' => $info->getName(), + 'id' => $info->getId(), + 'name' => $info->getName(), 'description' => $info->getDescription(), - 'authors' => $info->getAuthors(), + 'authors' => $info->getAuthors(), 'maintainers' => $info->getMaintainers(), - 'version' => $info->getVersion(), - 'status' => $info->getStatus(), + 'version' => $info->getVersion(), + 'status' => $info->getStatus(), ]; $this->assertSame($expected, $data); diff --git a/tests/Unit/Core/Addon/AddonManagerHelperTest.php b/tests/Unit/Core/Addon/AddonManagerHelperTest.php index 9dbbbdfdd0..fae0502474 100644 --- a/tests/Unit/Core/Addon/AddonManagerHelperTest.php +++ b/tests/Unit/Core/Addon/AddonManagerHelperTest.php @@ -60,7 +60,7 @@ class AddonManagerHelperTest extends TestCase $config->method('get')->willReturn([ 'helloaddon' => [ 'last_update' => 1738760499, - 'admin' => false, + 'admin' => false, ], ]); @@ -90,7 +90,7 @@ class AddonManagerHelperTest extends TestCase $config->method('get')->willReturn([ 'helloaddon' => [ 'last_update' => 1738760499, - 'admin' => false, + 'admin' => false, ], ]); @@ -114,11 +114,11 @@ class AddonManagerHelperTest extends TestCase $config->method('get')->willReturn([ 'helloaddon' => [ 'last_update' => 1738760499, - 'admin' => false, + 'admin' => false, ], 'addonwithadminsettings' => [ 'last_update' => 1738760499, - 'admin' => true, + 'admin' => true, ], ]); @@ -360,7 +360,7 @@ class AddonManagerHelperTest extends TestCase $config->method('get')->willReturn([ 'helloaddon' => [ 'last_update' => 1234567890, - 'admin' => false, + 'admin' => false, ], ]); @@ -406,7 +406,7 @@ class AddonManagerHelperTest extends TestCase $config->method('get')->willReturn([ $addonName => [ 'last_update' => 0, - 'admin' => false, + 'admin' => false, ], ]);