Fix code style

This commit is contained in:
Art4 2025-05-15 07:15:23 +00:00
parent 075e9eaaa9
commit 44c8cd118c
3 changed files with 24 additions and 23 deletions

View file

@ -155,7 +155,8 @@ final class AddonInfo
private string $status = ''; private string $status = '';
private function __construct() { private function __construct()
{
} }
public function getId(): string public function getId(): string

View file

@ -41,15 +41,15 @@ class AddonInfoTest extends TestCase
*/ */
TEXT, TEXT,
[ [
'id' => 'test', 'id' => 'test',
'name' => 'Test Addon', 'name' => 'Test Addon',
'description' => 'adds awesome features to friendica', 'description' => 'adds awesome features to friendica',
'maintainers' => [ 'maintainers' => [
['name' => 'Robin'], ['name' => 'Robin'],
], ],
'version' => '100.4.50-beta.5', 'version' => '100.4.50-beta.5',
'status' => 'beta', 'status' => 'beta',
], ],
], ],
'without-maintainer' => [ 'without-maintainer' => [
@ -66,14 +66,14 @@ class AddonInfoTest extends TestCase
*/ */
TEXT, TEXT,
[ [
'id' => 'test', 'id' => 'test',
'name' => 'Test Addon', 'name' => 'Test Addon',
'description' => 'adds awesome features to friendica', 'description' => 'adds awesome features to friendica',
'authors' => [ 'authors' => [
['name' => 'Sam'], ['name' => 'Sam'],
], ],
'version' => '100.4.50-beta.5', 'version' => '100.4.50-beta.5',
'status' => 'beta', 'status' => 'beta',
], ],
], ],
'complete' => [ 'complete' => [
@ -93,10 +93,10 @@ class AddonInfoTest extends TestCase
*/ */
TEXT, TEXT,
[ [
'id' => 'test', 'id' => 'test',
'name' => 'Test Addon', 'name' => 'Test Addon',
'description' => 'adds awesome features to friendica', 'description' => 'adds awesome features to friendica',
'authors' => [ 'authors' => [
['name' => 'Sam'], ['name' => 'Sam'],
['name' => 'Sam With Mail', 'link' => 'mail@example.org'], ['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'], ['name' => 'Robin With Profile', 'link' => 'https://example.org/profile/robin'],
], ],
'version' => '100.4.50-beta.5', 'version' => '100.4.50-beta.5',
'status' => 'beta', 'status' => 'beta',
], ],
], ],
]; ];
@ -155,13 +155,13 @@ class AddonInfoTest extends TestCase
); );
$data = [ $data = [
'id' => $info->getId(), 'id' => $info->getId(),
'name' => $info->getName(), 'name' => $info->getName(),
'description' => $info->getDescription(), 'description' => $info->getDescription(),
'authors' => $info->getAuthors(), 'authors' => $info->getAuthors(),
'maintainers' => $info->getMaintainers(), 'maintainers' => $info->getMaintainers(),
'version' => $info->getVersion(), 'version' => $info->getVersion(),
'status' => $info->getStatus(), 'status' => $info->getStatus(),
]; ];
$this->assertSame($expected, $data); $this->assertSame($expected, $data);

View file

@ -60,7 +60,7 @@ class AddonManagerHelperTest extends TestCase
$config->method('get')->willReturn([ $config->method('get')->willReturn([
'helloaddon' => [ 'helloaddon' => [
'last_update' => 1738760499, 'last_update' => 1738760499,
'admin' => false, 'admin' => false,
], ],
]); ]);
@ -90,7 +90,7 @@ class AddonManagerHelperTest extends TestCase
$config->method('get')->willReturn([ $config->method('get')->willReturn([
'helloaddon' => [ 'helloaddon' => [
'last_update' => 1738760499, 'last_update' => 1738760499,
'admin' => false, 'admin' => false,
], ],
]); ]);
@ -114,11 +114,11 @@ class AddonManagerHelperTest extends TestCase
$config->method('get')->willReturn([ $config->method('get')->willReturn([
'helloaddon' => [ 'helloaddon' => [
'last_update' => 1738760499, 'last_update' => 1738760499,
'admin' => false, 'admin' => false,
], ],
'addonwithadminsettings' => [ 'addonwithadminsettings' => [
'last_update' => 1738760499, 'last_update' => 1738760499,
'admin' => true, 'admin' => true,
], ],
]); ]);
@ -360,7 +360,7 @@ class AddonManagerHelperTest extends TestCase
$config->method('get')->willReturn([ $config->method('get')->willReturn([
'helloaddon' => [ 'helloaddon' => [
'last_update' => 1234567890, 'last_update' => 1234567890,
'admin' => false, 'admin' => false,
], ],
]); ]);
@ -406,7 +406,7 @@ class AddonManagerHelperTest extends TestCase
$config->method('get')->willReturn([ $config->method('get')->willReturn([
$addonName => [ $addonName => [
'last_update' => 0, 'last_update' => 0,
'admin' => false, 'admin' => false,
], ],
]); ]);