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
chore: drop verbose docblocks across PostHog and billing files
Paulo Castellanoff23b5084b51
diff --git a/app/Jobs/PostHog/SendEvent.php b/app/Jobs/PostHog/SendEvent.phpindex e21acbd67..0057938f7 100644--- a/app/Jobs/PostHog/SendEvent.php+++ b/app/Jobs/PostHog/SendEvent.php@@ -13,16 +13,6 @@ use Illuminate\Queue\SerializesModels;use Illuminate\Support\Facades\Log;use PostHog\PostHog;-/**- * Low-level PostHog dispatch worker. Forwards a single API call (`capture`,- * `identify`, `groupIdentify`) to the PostHog SDK. Higher-level jobs in this- * namespace (`SyncUser`, `TrackBilling`) build the payloads and queue this- * job to do the network work.- *- * No-op when `POSTHOG_ENABLED` is false (or `POSTHOG_API_KEY` is unset),- * via `PostHogService::isEnabled()`, so self-hosted installs never reach- * the SDK.- */class SendEvent implements ShouldQueue{use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;diff --git a/app/Jobs/PostHog/SyncUser.php b/app/Jobs/PostHog/SyncUser.phpindex aeed8ab8c..0899464bd 100644--- a/app/Jobs/PostHog/SyncUser.php+++ b/app/Jobs/PostHog/SyncUser.php@@ -12,22 +12,6 @@ use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;-/**- * Centralised PostHog sync for a single user. Dispatched from places the- * frontend can't observe (signup, Stripe webhooks) so the person profile- * and account/workspace groups carry up-to-date properties without blocking- * the calling request. Inertia navigations refresh group counts on the- * client (see `syncPostHogContext` in resources/js/posthog.ts), so this job- * is not needed on every domain trigger.- *- * Hierarchy mirrors the domain model:- * - person → User- * - group `account` → Account (billing/plan, parent of workspaces)- * - group `workspace` → Workspace (collaboration unit, child of account)- *- * No-op when PostHog is disabled (`POSTHOG_ENABLED=false` or no API key)- * via `PostHogService::isEnabled()`, so self-hosted installs are unaffected.- */class SyncUser implements ShouldQueue{use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;diff --git a/app/Jobs/PostHog/TrackBilling.php b/app/Jobs/PostHog/TrackBilling.phpindex 7c178ee67..59f2a1a9e 100644--- a/app/Jobs/PostHog/TrackBilling.php+++ b/app/Jobs/PostHog/TrackBilling.php@@ -13,14 +13,6 @@ use Illuminate\Foundation\Bus\Dispatchable;use Illuminate\Queue\InteractsWithQueue;use Illuminate\Queue\SerializesModels;-/**- * Captures a Stripe billing lifecycle event on the account owner profile- * with the `account` group attached, then re-queues `SyncUser` so the- * group properties (plan, has_active_subscription, is_on_trial) reflect- * the new Stripe state. Dispatched by `StripeEventListener`.- *- * No-op when PostHog is disabled (`POSTHOG_ENABLED=false` or no API key).- */class TrackBilling implements ShouldQueue{use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 56edf84fc..b97058bd2 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -32,13 +32,6 @@ class Account extends Model'plan_id',];- /**- * Drop the cached Pennant feature values for the plan-scoped limits so- * the next read resolves against the current plan. Call this right after- * any `plan_id` change. Centralised here (instead of as a model hook) so- * self-hosted installs — where Stripe webhooks never fire and the billing- * controllers redirect away — never trigger this path.- */public function forgetPlanFeatureCache(): void{Feature::for($this)->forget([diff --git a/app/Models/Traits/HasUsage.php b/app/Models/Traits/HasUsage.phpindex e97f8f72b..256fe8883 100644--- a/app/Models/Traits/HasUsage.php+++ b/app/Models/Traits/HasUsage.php@@ -66,14 +66,8 @@ trait HasUsage}/**- * The `(int)` cast on the cached value is load-bearing: Laravel's- * RedisStore skips serialize()/unserialize() for is_numeric values so- * they can be incremented atomically — the side effect is that an int- * stored via `Cache::put` comes back as a string on read. Without the- * cast, the strict `: int` return type throws a TypeError under the- * Redis cache driver (production). File/array/database drivers don't- * have this optimisation and preserve the type, which is why the bug- * never surfaced in tests or local dev.+ * The `(int)` cast is load-bearing: Laravel's RedisStore stores numeric+ * values raw (for atomic INCR) and returns them as strings on read.** @param array<int, string> $workspaceIds*/diff --git a/app/Services/PostHogService.php b/app/Services/PostHogService.phpindex cde8fdd4b..074dbb585 100644--- a/app/Services/PostHogService.php+++ b/app/Services/PostHogService.php@@ -10,12 +10,6 @@ use Illuminate\Support\Facades\Log;class PostHogService{- /**- * Whether PostHog tracking should run at all. Controlled by the explicit- * `POSTHOG_ENABLED` env var so self-hosted installs that inherited an- * example `POSTHOG_API_KEY` from a config snippet do not silently send- * events upstream. The SaaS deployment opts in via `POSTHOG_ENABLED=true`.- */public static function isEnabled(): bool{return (bool) config('services.posthog.enabled')@@ -23,10 +17,6 @@ class PostHogService}/**- * Capture an event for the given distinct id. When `$account` is supplied,- * the workspace/plan group is auto-attached so the event is filterable in- * PostHog by `$groups.account` and the `account_id` / `plan` properties.- ** @param array<string, mixed> $properties*/public function capture(string $distinctId, string $event, array $properties = [], ?Account $account = null): void