puphpeteer
puphpeteer copied to clipboard
Array shapes shouldn't require all the keys to be present in PHP documentation
For example, the Nesk\Puphpeteer\Resources\Page::addScriptTag() method takes an array shape:
https://github.com/rialto-php/puphpeteer/blob/a3c30bce7eb95d0c63373426cad06111d3b6bca6/src/Resources/Page.php#L33
Here, as written, all the keys are required. But if we look Puppeteer's documentation, none of the keys are required.
The documentation should be written as:
/**
* @method \Nesk\Puphpeteer\Resources\ElementHandle addScriptTag(array{ url?: string, path?: string, content?: string, type?: string } $options)
*/