{"action":"opened","issue":{"url":"https://api.github.com/repos/nrk/predis/issues/439","repository_url":"https://api.github.com/repos/nrk/predis","labels_url":"https://api.github.com/repos/nrk/predis/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/nrk/predis/issues/439/comments","events_url":"https://api.github.com/repos/nrk/predis/issues/439/events","html_url":"https://github.com/nrk/predis/issues/439","id":227486013,"number":439,"title":"Documentation & Docblocks","user":{"login":"gsdevme","id":319498,"avatar_url":"https://avatars1.githubusercontent.com/u/319498?v=3","gravatar_id":"","url":"https://api.github.com/users/gsdevme","html_url":"https://github.com/gsdevme","followers_url":"https://api.github.com/users/gsdevme/followers","following_url":"https://api.github.com/users/gsdevme/following{/other_user}","gists_url":"https://api.github.com/users/gsdevme/gists{/gist_id}","starred_url":"https://api.github.com/users/gsdevme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsdevme/subscriptions","organizations_url":"https://api.github.com/users/gsdevme/orgs","repos_url":"https://api.github.com/users/gsdevme/repos","events_url":"https://api.github.com/users/gsdevme/events{/privacy}","received_events_url":"https://api.github.com/users/gsdevme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-09T20:21:57Z","updated_at":"2017-05-09T20:21:57Z","closed_at":null,"body":"Hey,\r\n\r\nIm trying to run some static analysis against some code using the predis library, however Im struggling to workout certain arguments for methods.\r\n\r\nFor example we have some existing code using `zadd(KEY, SCORE, VALUE)` but then doesn't match the docblock. \r\n\r\n```\r\n * @method int    zadd($key, array $membersAndScoresDictionary)\r\n```\r\n\r\nLooking at the unit tests its invalid against the docblocks.\r\n\r\n```\r\n$redis->zadd('type:zset', 0, 'foobar');\r\n$this->assertEquals('zset', $redis->type('type:zset'));\r\n```\r\n\r\nLooking at the actual code its a little cryptic,  \r\n\r\n```\r\n    protected function filterArguments(array $arguments)\r\n    {\r\n        if (is_array(end($arguments))) {\r\n            foreach (array_pop($arguments) as $member => $score) {\r\n                $arguments[] = $score;\r\n                $arguments[] = $member;\r\n            }\r\n        }\r\n        return $arguments;\r\n    }\r\n```\r\n\r\nHowever If I actually pass an array like the docblocks state something funny happens \r\n\r\nhttps://3v4l.org/1Jkmk\r\n\r\nIs it just just a case the docblock is wrong? "}}
{"actor":{"display_login":"gsdevme"}}