1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 01:34:40 +01:00
This commit is contained in:
Daniil Gentili 2023-02-07 16:38:36 +01:00
parent c791134db5
commit de081572f0
4 changed files with 5 additions and 19 deletions

View File

@ -105,15 +105,10 @@
"scripts": {
"build": [
"@docs",
"@phpdoc",
"@docs-fix",
"@cs-fix",
"@psalm"
],
"phpdoc": [
"@phpdocInternal",
"@phpdocMain"
],
"check": [
"@cs",
"@test"
@ -123,7 +118,6 @@
"cs": "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php -d pcre.jit=0 vendor/bin/php-cs-fixer fix -v --diff",
"psalm": "psalm",
"phpdocMain": "php tools/phpdoc.php",
"docs": "php tools/build_docs.php",
"docs-fix": "tools/fix_docs.sh",
"test": "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit --coverage-text --config tests/phpunit.xml",

2
docs

@ -1 +1 @@
Subproject commit a9eab714f731a14f01bdc4fa9a42ad89e68a0979
Subproject commit a219e8a4f31000bf366993ab269b9ea2a95bbe2c

View File

@ -194,4 +194,4 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
'.$readme);
include 'phpdoc.php';
#include 'phpdoc.php';

View File

@ -33,17 +33,9 @@ if ($argc !== 3) {
*/
function getTL($layer)
{
$layer = __DIR__."/../schemas/TL_telegram_v$layer.tl";
$layer = new class($layer) extends TL {
public function __construct($layer)
{
$API = new class {
};
$API->logger = Logger::$default;
parent::__construct($API);
$this->init((new TLSchema)->setAPISchema($layer)->setSecretSchema(''));
}
};
$layerFile = __DIR__."/../schemas/TL_telegram_v$layer.tl";
$layer = new TL();
$layer->init((new TLSchema)->setAPISchema($layerFile)->setSecretSchema(''));
return ['methods' => $layer->getMethods(), 'constructors' => $layer->getConstructors()];
}