Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
refactor(linkedin): drop now-unused Platform::enabled() helper
Paulo Castellano6184807abad7
diff --git a/app/Enums/SocialAccount/Platform.php b/app/Enums/SocialAccount/Platform.phpindex 213f19214..85ee84165 100644--- a/app/Enums/SocialAccount/Platform.php+++ b/app/Enums/SocialAccount/Platform.php@@ -325,14 +325,4 @@ enum Platform: stringdefault => [],};}-- /**- * Get all enabled platforms.- *- * @return array<self>- */- public static function enabled(): array- {- return array_filter(self::cases(), fn (self $platform) => $platform->isEnabled());- }}diff --git a/tests/Unit/Enums/PlatformTest.php b/tests/Unit/Enums/PlatformTest.phpindex f0f496a61..b2587f45a 100644--- a/tests/Unit/Enums/PlatformTest.php+++ b/tests/Unit/Enums/PlatformTest.php@@ -96,21 +96,6 @@ test('platform can be disabled via config', function () {expect(Platform::LinkedIn->isEnabled())->toBeFalse();});-test('can get all enabled platforms', function () {- $enabled = Platform::enabled();-- expect($enabled)->toBeArray();- expect(count($enabled))->toBeGreaterThan(0);-});--test('disabled platforms are excluded from enabled list', function () {- config(['trypost.platforms.linkedin.enabled' => false]);-- $enabled = Platform::enabled();-- expect($enabled)->not->toContain(Platform::LinkedIn);-});-test('only linkedin pages are not directly connectable', function () {expect(Platform::LinkedInPage->isConnectable())->toBeFalse();expect(Platform::LinkedIn->isConnectable())->toBeTrue();