This commit is contained in:
Daniil Gentili 2024-06-30 16:06:07 +02:00
parent 41d37e28c5
commit 2871122256
21 changed files with 21 additions and 21 deletions

View File

@ -15,7 +15,7 @@ use RuntimeException;
use TelegramApiServer\EventObservers\EventHandler;
use TelegramApiServer\EventObservers\EventObserver;
class Client
final class Client
{
public static Client $self;
/** @var API[] */

View File

@ -4,7 +4,7 @@
namespace TelegramApiServer;
class Config
final class Config
{
private static ?Config $instance = null;
private array $config;

View File

@ -15,7 +15,7 @@ use function Amp\async;
use function Amp\delay;
use function Amp\Future\awaitAll;
class ApiController extends AbstractApiController
final class ApiController extends AbstractApiController
{
private ?string $session = '';

View File

@ -20,7 +20,7 @@ use TelegramApiServer\EventObservers\EventObserver;
use TelegramApiServer\Logger;
use Throwable;
class EventsController implements WebsocketClientHandler, WebsocketAcceptor
final class EventsController implements WebsocketClientHandler, WebsocketAcceptor
{
private const PING_INTERVAL_MS = 10_000;
private WebsocketClientGateway $gateway;

View File

@ -17,7 +17,7 @@ use Revolt\EventLoop;
use TelegramApiServer\EventObservers\LogObserver;
use TelegramApiServer\Logger;
class LogController implements WebsocketClientHandler, WebsocketAcceptor
final class LogController implements WebsocketClientHandler, WebsocketAcceptor
{
private const PING_INTERVAL_MS = 10_000;
private WebsocketClientGateway $gateway;

View File

@ -5,7 +5,7 @@ namespace TelegramApiServer\Controllers;
use Exception;
use TelegramApiServer\Client;
class SystemController extends AbstractApiController
final class SystemController extends AbstractApiController
{
/**
* Получаем параметры из uri

View File

@ -4,7 +4,7 @@ namespace TelegramApiServer\EventObservers;
use TelegramApiServer\Files;
class EventHandler extends \danog\MadelineProto\EventHandler
final class EventHandler extends \danog\MadelineProto\EventHandler
{
public static array $instances = [];
private string $sessionName;

View File

@ -9,7 +9,7 @@ use TelegramApiServer\Client;
use TelegramApiServer\Logger;
use Throwable;
class EventObserver
final class EventObserver
{
use ObserverTrait;

View File

@ -5,7 +5,7 @@ namespace TelegramApiServer\EventObservers;
use TelegramApiServer\Logger;
use Throwable;
class LogObserver
final class LogObserver
{
use ObserverTrait;

View File

@ -2,7 +2,7 @@
namespace TelegramApiServer\Exceptions;
class NoMediaException extends NoticeException
final class NoMediaException extends NoticeException
{
}

View File

@ -4,7 +4,7 @@ namespace TelegramApiServer\Exceptions;
use Exception;
class NoticeException extends Exception
final class NoticeException extends Exception
{
}

View File

@ -4,7 +4,7 @@ namespace TelegramApiServer;
use RuntimeException;
class Files
final class Files
{
public const SESSION_EXTENSION = '.madeline';

View File

@ -34,7 +34,7 @@ use const PHP_EOL;
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class Logger extends AbstractLogger
final class Logger extends AbstractLogger
{
private static ?Logger $instanse = null;

View File

@ -15,7 +15,7 @@ use TelegramApiServer\EventObservers\EventHandler;
use TelegramApiServer\Exceptions\NoMediaException;
use function Amp\delay;
class ApiExtensions
final class ApiExtensions
{
private MadelineProto\Api $madelineProto;

View File

@ -13,7 +13,7 @@ use function Amp\async;
use function Amp\File\deleteFile;
use function Amp\Future\awaitAll;
class SystemApiExtensions
final class SystemApiExtensions
{
private Client $client;

View File

@ -4,7 +4,7 @@ namespace TelegramApiServer\Migrations;
use danog\MadelineProto\Magic;
class StartUpFixes
final class StartUpFixes
{
public static function fix(): void
{

View File

@ -9,7 +9,7 @@ use Amp\Http\Server\Response;
use Psr\Log\LoggerInterface as PsrLogger;
use Psr\Log\LogLevel;
class AccessLoggerMiddleware implements Middleware
final class AccessLoggerMiddleware implements Middleware
{
public function __construct(
private readonly PsrLogger $logger,

View File

@ -9,7 +9,7 @@ use Amp\Http\Server\RequestHandler;
use Amp\Http\Server\Response;
use TelegramApiServer\Config;
class Authorization implements Middleware
final class Authorization implements Middleware
{
private array $ipWhitelist;
private int $selfIp;

View File

@ -5,7 +5,7 @@ namespace TelegramApiServer\Server;
use Amp\Http\Server\Response;
use TelegramApiServer\Controllers\AbstractApiController;
class ErrorResponses
final class ErrorResponses
{
/**
* @param int $status

View File

@ -16,7 +16,7 @@ use TelegramApiServer\MadelineProtoExtensions\ApiExtensions;
use TelegramApiServer\MadelineProtoExtensions\SystemApiExtensions;
use function Amp\Http\Server\Middleware\stackMiddleware;
class Router
final class Router
{
private \Amp\Http\Server\Router $router;
private SocketHttpServer $server;

View File

@ -18,7 +18,7 @@ use function sprintf;
use const SIGINT;
use const SIGTERM;
class Server
final class Server
{
/**
* Server constructor.