src/Parser/Parser.php
/**
     * Extracts modifiers from a command.
     *
     * @param string      $command         The command.
     * @param string|null $assertString    The resulting assert string.
     * @param string|null $modifiersString The resulting modifiers string.
     */
Extracts modifiers from a command.
@param string      $command         The command.
@param string|null $assertString    The resulting assert string.
@param string|null $modifiersString The resulting modifiers string.
Extracts modifiers from a command . @param string $command The command . @param string|null $assertString The resulting assert string . @param string|null $modifiersString The resulting modifiers string .
private static function extractModifiers(string $command, ?string &$assertString, ?string &$modifiersString): void
    {
        $assertString = '';
        $modifiersString = '';
        for ($i = strlen($command) - 1; $i >= 0; $i--) {
            $ch = $command[$i];
            if (!isset(self::MODIFIERS_INFO[$ch])) {
                break;
            }
        }
        $assertString = substr($command, 0, $i + 1);
        $modifiersString = substr($command, $i + 1);
    }
private static function extractModifiers ( string $ command , ? string & $ assertString , ? string & $ modifiersString ) : void { $ assertString = '' ; $ modifiersString = '' ; for ( $ i = strlen ( $ command ) - 1 ; $ i >= 0 ; $ i -- ) { $ ch = $ command [ $ i ] ; if ( ! isset ( self :: MODIFIERS_INFO [ $ ch ] ) ) { break ; } } $ assertString = substr ( $ command , 0 , $ i + 1 ) ; $ modifiersString = substr ( $ command , $ i + 1 ) ; }
Extracts modifiers from a command.
Extracts modifiers from a command .