{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/42250522","id":42250522,"diff_hunk":"@@ -68,13 +72,19 @@ public function generate(PromotionInterface $promotion, Instruction $instruction\n     /**\n      * {@inheritdoc}\n      */\n-    public function generateUniqueCode()\n+    public function generateUniqueCode($codeLength)\n     {\n         $code = null;\n \n+        if (1 > $codeLength || 40 < $codeLength) {","path":"src/Sylius/Component/Promotion/Generator/CouponGenerator.php","position":35,"original_position":35,"commit_id":"a745eb609eaa41d20311a08cf196b7b5f8ace56f","original_commit_id":"a745eb609eaa41d20311a08cf196b7b5f8ace56f","user":{"login":"pamil","id":1897953,"avatar_url":"https://avatars.githubusercontent.com/u/1897953?v=3","gravatar_id":"","url":"https://api.github.com/users/pamil","html_url":"https://github.com/pamil","followers_url":"https://api.github.com/users/pamil/followers","following_url":"https://api.github.com/users/pamil/following{/other_user}","gists_url":"https://api.github.com/users/pamil/gists{/gist_id}","starred_url":"https://api.github.com/users/pamil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamil/subscriptions","organizations_url":"https://api.github.com/users/pamil/orgs","repos_url":"https://api.github.com/users/pamil/repos","events_url":"https://api.github.com/users/pamil/events{/privacy}","received_events_url":"https://api.github.com/users/pamil/received_events","type":"User","site_admin":false},"body":"We use `sha1` to in this coupon generator so it is correct. It should not be in model as someone can impement generator that has different code length limitations.","created_at":"2015-10-16T14:46:20Z","updated_at":"2015-10-16T14:46:20Z","html_url":"https://github.com/Sylius/Sylius/pull/3339#discussion_r42250522","pull_request_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3339","_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/42250522"},"html":{"href":"https://github.com/Sylius/Sylius/pull/3339#discussion_r42250522"},"pull_request":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3339"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/3339","id":45767603,"html_url":"https://github.com/Sylius/Sylius/pull/3339","diff_url":"https://github.com/Sylius/Sylius/pull/3339.diff","patch_url":"https://github.com/Sylius/Sylius/pull/3339.patch","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/3339","number":3339,"state":"open","locked":false,"title":"[WIP][Promotion] Making coupon code length configurable.","user":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Fixed tickets | no\r\n| License       | MIT\r\n\r\nRebased PR from @Richtermeister https://github.com/Sylius/Sylius/pull/2389","created_at":"2015-09-23T11:19:53Z","updated_at":"2015-10-16T14:46:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4433ad9ad9920f4a73a7803bd476f23687c94489","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3339/commits","review_comments_url":"https://api.github.com/repos/Sylius/Sylius/pulls/3339/comments","review_comment_url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/3339/comments","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/a745eb609eaa41d20311a08cf196b7b5f8ace56f","head":{"label":"Arminek:specify-coupon-length","ref":"specify-coupon-length","sha":"a745eb609eaa41d20311a08cf196b7b5f8ace56f","user":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"repo":{"id":38776658,"name":"Sylius","full_name":"Arminek/Sylius","owner":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arminek/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":true,"url":"https://api.github.com/repos/Arminek/Sylius","forks_url":"https://api.github.com/repos/Arminek/Sylius/forks","keys_url":"https://api.github.com/repos/Arminek/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arminek/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arminek/Sylius/teams","hooks_url":"https://api.github.com/repos/Arminek/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Arminek/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Arminek/Sylius/events","assignees_url":"https://api.github.com/repos/Arminek/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Arminek/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Arminek/Sylius/tags","blobs_url":"https://api.github.com/repos/Arminek/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arminek/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arminek/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arminek/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arminek/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Arminek/Sylius/languages","stargazers_url":"https://api.github.com/repos/Arminek/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Arminek/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Arminek/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Arminek/Sylius/subscription","commits_url":"https://api.github.com/repos/Arminek/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arminek/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arminek/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arminek/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arminek/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Arminek/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arminek/Sylius/merges","archive_url":"https://api.github.com/repos/Arminek/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arminek/Sylius/downloads","issues_url":"https://api.github.com/repos/Arminek/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Arminek/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Arminek/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Arminek/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arminek/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Arminek/Sylius/releases{/id}","created_at":"2015-07-08T19:59:32Z","updated_at":"2015-07-08T19:59:39Z","pushed_at":"2015-10-16T07:27:05Z","git_url":"git://github.com/Arminek/Sylius.git","ssh_url":"git@github.com:Arminek/Sylius.git","clone_url":"https://github.com/Arminek/Sylius.git","svn_url":"https://github.com/Arminek/Sylius","homepage":"Sylius.org","size":18894,"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":"Sylius:master","ref":"master","sha":"df99d9dbbf516fbc881cf18b0ef7210fb5b68e6b","user":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"repo":{"id":2717549,"name":"Sylius","full_name":"Sylius/Sylius","owner":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sylius/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":false,"url":"https://api.github.com/repos/Sylius/Sylius","forks_url":"https://api.github.com/repos/Sylius/Sylius/forks","keys_url":"https://api.github.com/repos/Sylius/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sylius/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sylius/Sylius/teams","hooks_url":"https://api.github.com/repos/Sylius/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Sylius/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Sylius/Sylius/events","assignees_url":"https://api.github.com/repos/Sylius/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Sylius/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Sylius/Sylius/tags","blobs_url":"https://api.github.com/repos/Sylius/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sylius/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sylius/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sylius/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Sylius/Sylius/languages","stargazers_url":"https://api.github.com/repos/Sylius/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Sylius/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Sylius/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Sylius/Sylius/subscription","commits_url":"https://api.github.com/repos/Sylius/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sylius/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sylius/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sylius/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sylius/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Sylius/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sylius/Sylius/merges","archive_url":"https://api.github.com/repos/Sylius/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sylius/Sylius/downloads","issues_url":"https://api.github.com/repos/Sylius/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Sylius/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Sylius/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Sylius/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sylius/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Sylius/Sylius/releases{/id}","created_at":"2011-11-05T22:05:52Z","updated_at":"2015-10-15T18:52:28Z","pushed_at":"2015-10-16T09:57:04Z","git_url":"git://github.com/Sylius/Sylius.git","ssh_url":"git@github.com:Sylius/Sylius.git","clone_url":"https://github.com/Sylius/Sylius.git","svn_url":"https://github.com/Sylius/Sylius","homepage":"Sylius.org","size":70863,"stargazers_count":1992,"watchers_count":1992,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":728,"mirror_url":null,"open_issues_count":543,"forks":728,"open_issues":543,"watchers":1992,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3339"},"html":{"href":"https://github.com/Sylius/Sylius/pull/3339"},"issue":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/3339"},"comments":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/3339/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3339/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/3339/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/Sylius/statuses/a745eb609eaa41d20311a08cf196b7b5f8ace56f"}}}}