OSDN Git Service

ignore repeating parameters in enough_positionals()
authorscribu <mail@scribu.net>
Tue, 30 Jul 2013 01:59:06 +0000 (04:59 +0300)
committerscribu <mail@scribu.net>
Tue, 30 Jul 2013 02:00:24 +0000 (05:00 +0300)
This isn't necessarily the best approach, but it matches previous behaviour.

(see parent commit)

php/WP_CLI/SynopsisValidator.php

index 902b537..4b62a36 100644 (file)
@@ -16,7 +16,8 @@ class SynopsisValidator {
        public function enough_positionals( $args ) {
                $positional = $this->query_spec( array(
                        'type' => 'positional',
-                       'optional' => false
+                       'optional' => false,
+                       'repeating' => false
                ) );
 
                return count( $args ) >= count( $positional );