{"action":"opened","issue":{"url":"https://api.github.com/repos/c9s/GetOptionKit/issues/37","labels_url":"https://api.github.com/repos/c9s/GetOptionKit/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/c9s/GetOptionKit/issues/37/comments","events_url":"https://api.github.com/repos/c9s/GetOptionKit/issues/37/events","html_url":"https://github.com/c9s/GetOptionKit/issues/37","id":116077840,"number":37,"title":"Arguments aren't consumed for \"multiple\" options","user":{"login":"lillesvin","id":169406,"avatar_url":"https://avatars.githubusercontent.com/u/169406?v=3","gravatar_id":"","url":"https://api.github.com/users/lillesvin","html_url":"https://github.com/lillesvin","followers_url":"https://api.github.com/users/lillesvin/followers","following_url":"https://api.github.com/users/lillesvin/following{/other_user}","gists_url":"https://api.github.com/users/lillesvin/gists{/gist_id}","starred_url":"https://api.github.com/users/lillesvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lillesvin/subscriptions","organizations_url":"https://api.github.com/users/lillesvin/orgs","repos_url":"https://api.github.com/users/lillesvin/repos","events_url":"https://api.github.com/users/lillesvin/events{/privacy}","received_events_url":"https://api.github.com/users/lillesvin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-10T10:22:55Z","updated_at":"2015-11-10T10:22:55Z","closed_at":null,"body":"When defining a \"single\" option (e.g. `foo:=string`), that option's argument will be consumed and not returned with the remaining arguments from getArguments(), but a \"multiple\" option (e.g. `bar+=string`) does not consume its argument and leaves it with the rest of the arguments returned by getArguments().\r\n\r\n```php\r\n$specs = new \\GetOptionKit\\OptionCollection();\r\n$specs->add('test1+=string', 'Test 1');\r\n$specs->add('test2:=string', 'Test 2');\r\n\r\n$parser = new \\GetOptionKit\\OptionParser($specs);\r\n\r\n$result = $parser->parse(explode(' ', '--test1 opt1 --test2 opt2 arg1 arg2'));\r\n\r\n$result->getArguments(); // => [\"opt1\", \"arg1\", \"arg2\"]\r\n```\r\n\r\nIdeally, at least to the best of my knowledge, the arguments to a \"multiple\" option should be consumed and removed from the list returned by getArguments() so only `[\"arg1\", \"arg2\"]` would be returned in the above example."}}