From 03ee95752181c948c5b3f4dedbfcdcfbe082bd5e Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Tue, 26 Jan 2021 19:22:14 +0300 Subject: [PATCH] Add missing methods to Puppeteer class phpDocs --- src/Command/GenerateDocumentationCommand.php | 2 +- src/Puppeteer.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Command/GenerateDocumentationCommand.php b/src/Command/GenerateDocumentationCommand.php index e8edf14..e801428 100644 --- a/src/Command/GenerateDocumentationCommand.php +++ b/src/Command/GenerateDocumentationCommand.php @@ -71,7 +71,7 @@ private static function getDocumentation(string $puppeteerPath, array $resourceN private static function getResourceNames(): array { - return array_map(function (string $filePath): string { + return array_map(static function (string $filePath): string { return explode('.', \basename($filePath))[0]; }, \glob(self::RESOURCES_DIR.'/*')); } diff --git a/src/Puppeteer.php b/src/Puppeteer.php index aecc7f3..73cb534 100644 --- a/src/Puppeteer.php +++ b/src/Puppeteer.php @@ -3,6 +3,7 @@ namespace Nesk\Puphpeteer; use Nesk\Puphpeteer\Resources\Browser; +use Nesk\Puphpeteer\Resources\BrowserFetcher; use Psr\Log\LoggerInterface; use Symfony\Component\Process\Process; use Nesk\Rialto\AbstractEntryPoint; @@ -11,11 +12,16 @@ /** * @property-read mixed devices * @property-read mixed errors + * @property-read string product * @method Browser connect(array $options) + * @method Browser launch(array $options = []) + * @method string[] defaultArgs(array $options = []) * @method void registerCustomQueryHandler(string $name, mixed $queryHandler) * @method void unregisterCustomQueryHandler(string $name) * @method string[] customQueryHandlerNames() * @method void clearCustomQueryHandlers() + * @method BrowserFetcher createBrowserFetcher(array $options = []) + * @method string executablePath() */ class Puppeteer extends AbstractEntryPoint {