From 5d4c717031104bf89b74677407e2313e9ac15a89 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 15 Aug 2024 18:22:31 +0200 Subject: [PATCH] Bump docs --- docs | 2 +- src/API.php | 2 +- src/InternalDoc.php | 2 +- tools/AnnotationsBuilder.php | 1 + tools/DocsBuilder.php | 2 +- tools/DocsBuilder/Methods.php | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs b/docs index 999eee65a..ffea6f27e 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 999eee65a69c42796866262379983ea984c141aa +Subproject commit ffea6f27ef15623eb0efe9ebce30ae213a0aba4d diff --git a/src/API.php b/src/API.php index 09ea981b8..59b4834c8 100644 --- a/src/API.php +++ b/src/API.php @@ -51,7 +51,7 @@ final class API extends AbstractAPI * * @var string */ - public const RELEASE = '8.2.1'; + public const RELEASE = '8.2.2'; /** * We're not logged in. * diff --git a/src/InternalDoc.php b/src/InternalDoc.php index 73a32433b..5fb136e13 100644 --- a/src/InternalDoc.php +++ b/src/InternalDoc.php @@ -657,7 +657,7 @@ abstract class InternalDoc * * Returns a vector hash. * - * @param array $longs IDs + * @param array $longs IDs */ final public static function genVectorHash(array $longs): string { diff --git a/tools/AnnotationsBuilder.php b/tools/AnnotationsBuilder.php index dd1e0b0b0..292a4bd28 100644 --- a/tools/AnnotationsBuilder.php +++ b/tools/AnnotationsBuilder.php @@ -108,6 +108,7 @@ final class Blacklist { 'waveform' => 'array', 'int' => 'int', 'long' => 'int', + 'long|string' => 'int|string', 'strlong' => 'int', 'double' => 'float', 'float' => 'float', diff --git a/tools/DocsBuilder.php b/tools/DocsBuilder.php index 64396bc88..60b48d74c 100644 --- a/tools/DocsBuilder.php +++ b/tools/DocsBuilder.php @@ -141,7 +141,7 @@ final class DocsBuilder file_put_contents('types/'.$this->index, $this->templates['types-index'].$index); Logger::log('Generating additional types...', Logger::NOTICE); - foreach (['waveform', 'string', 'bytes', 'int', 'int53', 'long', 'int128', 'int256', 'int512', 'double', 'Bool', 'DataJSON', '!X'] as $type) { + foreach (['waveform', 'string', 'bytes', 'int', 'int53', 'long', 'long|string', 'int128', 'int256', 'int512', 'double', 'Bool', 'DataJSON', '!X'] as $type) { file_put_contents("types/$type.md", $this->templates[$type]); } foreach (['boolFalse', 'boolTrue', 'null', 'photoStrippedSize'] as $constructor) { diff --git a/tools/DocsBuilder/Methods.php b/tools/DocsBuilder/Methods.php index 278fe1c91..3358d682a 100644 --- a/tools/DocsBuilder/Methods.php +++ b/tools/DocsBuilder/Methods.php @@ -186,7 +186,7 @@ trait Methods if (\in_array($ptype, ['InputEncryptedFile'], true) && !isset($this->settings['td'])) { $human_ptype = 'File path or '.$ptype; } - $type_or_bare_type = ctype_upper(Tools::end(explode('.', $param[$type_or_subtype]))[0]) || \in_array($param[$type_or_subtype], ['!X', 'X', 'bytes', 'true', 'false', 'double', 'string', 'Bool', 'int', 'long', 'int128', 'int256', 'int512', 'int53'], true) ? 'types' : 'constructors'; + $type_or_bare_type = ctype_upper(Tools::end(explode('.', $param[$type_or_subtype]))[0]) || \in_array($param[$type_or_subtype], ['!X', 'X', 'bytes', 'true', 'false', 'double', 'string', 'Bool', 'int', 'long', 'int128', 'int256', 'int512', 'int53', 'long|string'], true) ? 'types' : 'constructors'; if (isset($this->tdDescriptions['methods'][$method])) { $table .= '|'.self::markdownEscape($param['name']).'|'.(isset($param['subtype']) ? 'Array of ' : '').'['.self::markdownEscape($human_ptype).'](/API_docs/'.$type_or_bare_type.'/'.$ptype.'.md) | '.$this->tdDescriptions['methods'][$method]['params'][$param['name']].' | '.(isset($param['pow']) || $param['type'] === 'int' || $param['type'] === 'string' || $param['type'] === 'double' || ($id = $this->TL->getConstructors()->findByPredicate(lcfirst($param['type']).'Empty')) && $id['type'] === $param['type'] || ($id = $this->TL->getConstructors()->findByPredicate('input'.$param['type'].'Empty')) && $id['type'] === $param['type'] ? 'Optional' : 'Yes').'|'; } else {