{"action":"created","comment":{"url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/comments/25268478","id":25268478,"diff_hunk":"@@ -363,4 +364,21 @@ protected function _sync($fields, $conditions, $scope = null)\n         }\n         return $this->_table->updateAll($fields, $conditions);\n     }\n+\n+    /**\n+     * Returns the update expression for the order field\n+     *\n+     * @param string $direction Whether to increment or decrement the field\n+     * @param string $amount Amount to modify the field by\n+     */\n+    protected function _getOrderUpdateExpression($direction = 'increment', $amount = 1) {","path":"src/Model/Behavior/SequenceBehavior.php","position":73,"original_position":73,"commit_id":"12d9f932788e2751ce4cbc8f917158c30abc458f","original_commit_id":"12d9f932788e2751ce4cbc8f917158c30abc458f","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"body":"- Method name is a bit too long, just `_getUpdateExpression()` is good enough. \r\n- No need to use strings `increment`, `decrement` for direction, just directly use `+`, `-`.\r\n- `$amount` param can probably be dropped. I don't think there will be a use case of amount value other than 1.","created_at":"2015-02-24T16:50:08Z","updated_at":"2015-02-24T16:50:08Z","html_url":"https://github.com/ADmad/cakephp-sequence/pull/5#discussion_r25268478","pull_request_url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/comments/25268478"},"html":{"href":"https://github.com/ADmad/cakephp-sequence/pull/5#discussion_r25268478"},"pull_request":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5","id":29912957,"html_url":"https://github.com/ADmad/cakephp-sequence/pull/5","diff_url":"https://github.com/ADmad/cakephp-sequence/pull/5.diff","patch_url":"https://github.com/ADmad/cakephp-sequence/pull/5.patch","issue_url":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/5","number":5,"state":"open","locked":false,"title":"Proper handling when using keywords as the order option","user":{"login":"veganista","id":405763,"avatar_url":"https://avatars.githubusercontent.com/u/405763?v=3","gravatar_id":"","url":"https://api.github.com/users/veganista","html_url":"https://github.com/veganista","followers_url":"https://api.github.com/users/veganista/followers","following_url":"https://api.github.com/users/veganista/following{/other_user}","gists_url":"https://api.github.com/users/veganista/gists{/gist_id}","starred_url":"https://api.github.com/users/veganista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veganista/subscriptions","organizations_url":"https://api.github.com/users/veganista/orgs","repos_url":"https://api.github.com/users/veganista/repos","events_url":"https://api.github.com/users/veganista/events{/privacy}","received_events_url":"https://api.github.com/users/veganista/received_events","type":"User","site_admin":false},"body":"Should fix #2 ","created_at":"2015-02-24T16:35:55Z","updated_at":"2015-02-24T16:50:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5468792bb7c4d12c19456b2d28c8bcfdb9047a71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5/commits","review_comments_url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5/comments","review_comment_url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/5/comments","statuses_url":"https://api.github.com/repos/ADmad/cakephp-sequence/statuses/12d9f932788e2751ce4cbc8f917158c30abc458f","head":{"label":"veganista:master","ref":"master","sha":"12d9f932788e2751ce4cbc8f917158c30abc458f","user":{"login":"veganista","id":405763,"avatar_url":"https://avatars.githubusercontent.com/u/405763?v=3","gravatar_id":"","url":"https://api.github.com/users/veganista","html_url":"https://github.com/veganista","followers_url":"https://api.github.com/users/veganista/followers","following_url":"https://api.github.com/users/veganista/following{/other_user}","gists_url":"https://api.github.com/users/veganista/gists{/gist_id}","starred_url":"https://api.github.com/users/veganista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veganista/subscriptions","organizations_url":"https://api.github.com/users/veganista/orgs","repos_url":"https://api.github.com/users/veganista/repos","events_url":"https://api.github.com/users/veganista/events{/privacy}","received_events_url":"https://api.github.com/users/veganista/received_events","type":"User","site_admin":false},"repo":{"id":31263846,"name":"cakephp-sequence","full_name":"veganista/cakephp-sequence","owner":{"login":"veganista","id":405763,"avatar_url":"https://avatars.githubusercontent.com/u/405763?v=3","gravatar_id":"","url":"https://api.github.com/users/veganista","html_url":"https://github.com/veganista","followers_url":"https://api.github.com/users/veganista/followers","following_url":"https://api.github.com/users/veganista/following{/other_user}","gists_url":"https://api.github.com/users/veganista/gists{/gist_id}","starred_url":"https://api.github.com/users/veganista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veganista/subscriptions","organizations_url":"https://api.github.com/users/veganista/orgs","repos_url":"https://api.github.com/users/veganista/repos","events_url":"https://api.github.com/users/veganista/events{/privacy}","received_events_url":"https://api.github.com/users/veganista/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/veganista/cakephp-sequence","description":"CakePHP 3.0+ behavior in a plugin to maintain a contiguous sequence","fork":true,"url":"https://api.github.com/repos/veganista/cakephp-sequence","forks_url":"https://api.github.com/repos/veganista/cakephp-sequence/forks","keys_url":"https://api.github.com/repos/veganista/cakephp-sequence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/veganista/cakephp-sequence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/veganista/cakephp-sequence/teams","hooks_url":"https://api.github.com/repos/veganista/cakephp-sequence/hooks","issue_events_url":"https://api.github.com/repos/veganista/cakephp-sequence/issues/events{/number}","events_url":"https://api.github.com/repos/veganista/cakephp-sequence/events","assignees_url":"https://api.github.com/repos/veganista/cakephp-sequence/assignees{/user}","branches_url":"https://api.github.com/repos/veganista/cakephp-sequence/branches{/branch}","tags_url":"https://api.github.com/repos/veganista/cakephp-sequence/tags","blobs_url":"https://api.github.com/repos/veganista/cakephp-sequence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/veganista/cakephp-sequence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/veganista/cakephp-sequence/git/refs{/sha}","trees_url":"https://api.github.com/repos/veganista/cakephp-sequence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/veganista/cakephp-sequence/statuses/{sha}","languages_url":"https://api.github.com/repos/veganista/cakephp-sequence/languages","stargazers_url":"https://api.github.com/repos/veganista/cakephp-sequence/stargazers","contributors_url":"https://api.github.com/repos/veganista/cakephp-sequence/contributors","subscribers_url":"https://api.github.com/repos/veganista/cakephp-sequence/subscribers","subscription_url":"https://api.github.com/repos/veganista/cakephp-sequence/subscription","commits_url":"https://api.github.com/repos/veganista/cakephp-sequence/commits{/sha}","git_commits_url":"https://api.github.com/repos/veganista/cakephp-sequence/git/commits{/sha}","comments_url":"https://api.github.com/repos/veganista/cakephp-sequence/comments{/number}","issue_comment_url":"https://api.github.com/repos/veganista/cakephp-sequence/issues/comments{/number}","contents_url":"https://api.github.com/repos/veganista/cakephp-sequence/contents/{+path}","compare_url":"https://api.github.com/repos/veganista/cakephp-sequence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/veganista/cakephp-sequence/merges","archive_url":"https://api.github.com/repos/veganista/cakephp-sequence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/veganista/cakephp-sequence/downloads","issues_url":"https://api.github.com/repos/veganista/cakephp-sequence/issues{/number}","pulls_url":"https://api.github.com/repos/veganista/cakephp-sequence/pulls{/number}","milestones_url":"https://api.github.com/repos/veganista/cakephp-sequence/milestones{/number}","notifications_url":"https://api.github.com/repos/veganista/cakephp-sequence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/veganista/cakephp-sequence/labels{/name}","releases_url":"https://api.github.com/repos/veganista/cakephp-sequence/releases{/id}","created_at":"2015-02-24T14:32:15Z","updated_at":"2015-02-24T16:35:03Z","pushed_at":"2015-02-24T16:35:03Z","git_url":"git://github.com/veganista/cakephp-sequence.git","ssh_url":"git@github.com:veganista/cakephp-sequence.git","clone_url":"https://github.com/veganista/cakephp-sequence.git","svn_url":"https://github.com/veganista/cakephp-sequence","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ADmad:master","ref":"master","sha":"7731f5c9d97abce1bd441c9b7e0ed62295dc13f6","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"repo":{"id":30717712,"name":"cakephp-sequence","full_name":"ADmad/cakephp-sequence","owner":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ADmad/cakephp-sequence","description":"CakePHP 3.0+ behavior in a plugin to maintain a contiguous sequence","fork":false,"url":"https://api.github.com/repos/ADmad/cakephp-sequence","forks_url":"https://api.github.com/repos/ADmad/cakephp-sequence/forks","keys_url":"https://api.github.com/repos/ADmad/cakephp-sequence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ADmad/cakephp-sequence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ADmad/cakephp-sequence/teams","hooks_url":"https://api.github.com/repos/ADmad/cakephp-sequence/hooks","issue_events_url":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/events{/number}","events_url":"https://api.github.com/repos/ADmad/cakephp-sequence/events","assignees_url":"https://api.github.com/repos/ADmad/cakephp-sequence/assignees{/user}","branches_url":"https://api.github.com/repos/ADmad/cakephp-sequence/branches{/branch}","tags_url":"https://api.github.com/repos/ADmad/cakephp-sequence/tags","blobs_url":"https://api.github.com/repos/ADmad/cakephp-sequence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ADmad/cakephp-sequence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ADmad/cakephp-sequence/git/refs{/sha}","trees_url":"https://api.github.com/repos/ADmad/cakephp-sequence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ADmad/cakephp-sequence/statuses/{sha}","languages_url":"https://api.github.com/repos/ADmad/cakephp-sequence/languages","stargazers_url":"https://api.github.com/repos/ADmad/cakephp-sequence/stargazers","contributors_url":"https://api.github.com/repos/ADmad/cakephp-sequence/contributors","subscribers_url":"https://api.github.com/repos/ADmad/cakephp-sequence/subscribers","subscription_url":"https://api.github.com/repos/ADmad/cakephp-sequence/subscription","commits_url":"https://api.github.com/repos/ADmad/cakephp-sequence/commits{/sha}","git_commits_url":"https://api.github.com/repos/ADmad/cakephp-sequence/git/commits{/sha}","comments_url":"https://api.github.com/repos/ADmad/cakephp-sequence/comments{/number}","issue_comment_url":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/comments{/number}","contents_url":"https://api.github.com/repos/ADmad/cakephp-sequence/contents/{+path}","compare_url":"https://api.github.com/repos/ADmad/cakephp-sequence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ADmad/cakephp-sequence/merges","archive_url":"https://api.github.com/repos/ADmad/cakephp-sequence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ADmad/cakephp-sequence/downloads","issues_url":"https://api.github.com/repos/ADmad/cakephp-sequence/issues{/number}","pulls_url":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls{/number}","milestones_url":"https://api.github.com/repos/ADmad/cakephp-sequence/milestones{/number}","notifications_url":"https://api.github.com/repos/ADmad/cakephp-sequence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ADmad/cakephp-sequence/labels{/name}","releases_url":"https://api.github.com/repos/ADmad/cakephp-sequence/releases{/id}","created_at":"2015-02-12T18:45:01Z","updated_at":"2015-02-24T15:07:21Z","pushed_at":"2015-02-24T15:07:20Z","git_url":"git://github.com/ADmad/cakephp-sequence.git","ssh_url":"git@github.com:ADmad/cakephp-sequence.git","clone_url":"https://github.com/ADmad/cakephp-sequence.git","svn_url":"https://github.com/ADmad/cakephp-sequence","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5"},"html":{"href":"https://github.com/ADmad/cakephp-sequence/pull/5"},"issue":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/5"},"comments":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/ADmad/cakephp-sequence/statuses/12d9f932788e2751ce4cbc8f917158c30abc458f"}}}}