This patch seems correct as not providing an IDX seems pointless so I assume marking this as optional is incorrect. If this is not the case feel free to revert the change.

- girgias

--------------

Clarifying the type declaration for the $idx parameter. I encountered a Fatal error:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to ParleParser::sigil() must be of the type integer, array given

In PHPStorm, looking at the stub for Parle/Parser.php it declares the type of $idx as an array instead of int. I'm planning to submit a patch to JetBrains once this documentation has been updated :)

-- 
Provided by anonymous 97393 (me@rowles.ch)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347417 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
George Peter Banyard 2019-05-13 20:44:52 +00:00
parent db880d014b
commit 0d349de6d7

View file

@ -11,7 +11,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>string</type><methodname>Parle\Parser::sigil</methodname>
<methodparam choice="opt"><type>int</type><parameter>idx</parameter></methodparam>
<methodparam><type>int</type><parameter>idx</parameter></methodparam>
</methodsynopsis>
<para>
Retrieve a part of the match by a rule. This method is equivalent to the pseudo variable functionality in Bison.