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
<?php
declare(strict_types=1);
namespace App\Support\Analytics;
class MetricComparison
{
/** @return array{value: int|float|null, previous: int|float|null, change: ?float} */
public static function between(int|float|null $current, int|float|null $previous): array
{
return [
'value' => $current,
'previous' => $previous,
'change' => $current !== null && $previous !== null && $previous != 0
? round(($current - $previous) / $previous * 100, 2) : null,
];
}
}