{"action":"closed","number":5,"pull_request":{"url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5","id":42096487,"html_url":"https://github.com/tecnickcom/tc-lib-barcode/pull/5","diff_url":"https://github.com/tecnickcom/tc-lib-barcode/pull/5.diff","patch_url":"https://github.com/tecnickcom/tc-lib-barcode/pull/5.patch","issue_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/5","number":5,"state":"closed","locked":false,"title":"API improvments - discussion","user":{"login":"remicollet","id":270445,"avatar_url":"https://avatars.githubusercontent.com/u/270445?v=3","gravatar_id":"","url":"https://api.github.com/users/remicollet","html_url":"https://github.com/remicollet","followers_url":"https://api.github.com/users/remicollet/followers","following_url":"https://api.github.com/users/remicollet/following{/other_user}","gists_url":"https://api.github.com/users/remicollet/gists{/gist_id}","starred_url":"https://api.github.com/users/remicollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remicollet/subscriptions","organizations_url":"https://api.github.com/users/remicollet/orgs","repos_url":"https://api.github.com/users/remicollet/repos","events_url":"https://api.github.com/users/remicollet/events{/privacy}","received_events_url":"https://api.github.com/users/remicollet/received_events","type":"User","site_admin":false},"body":"This is mostly for discussion\r\n\r\nReading code, it seems getBarcodeObj is static, which make code simpler (no need to instanciate an object)\r\n\r\nHaving the setters returning $this seems a current practice, and allow to run\r\n\r\n        \\Com\\Tecnick\\Barcode\\Barcode::getBarcodeObj(\r\n            'LRAW,AB,12,E3F',\r\n            '01001100011100001111,10110011100011110000'\r\n        )->setSize(-1,-1)\r\n         ->setColor('purple')\r\n         ->setPadding(array(-1,-1,-1,-1))\r\n         ->getPng();\r\n\r\nOk, this usage requires PHP > 5.4, but some could find it more legible (not having named parameters in PHP is a real lack...) Probably the test added for 5.4 could raise a parse error with 5.3.\r\n\r\nWe can even imagine further changes to write\r\n\r\n        \\Com\\Tecnick\\Barcode\\Barcode::getBarcodeObj('LRAW')\r\n           ->setCode('01001100011100001111,10110011100011110000')\r\n           ->setParameters('AB','12','E3F')\r\n           ->setSize(-1,-1)\r\n           ->setColor('purple')\r\n           ->setPadding([-1,-1,-1,-1])\r\n           ->getPng();\r\n\r\n","created_at":"2015-08-11T06:27:32Z","updated_at":"2015-08-11T09:39:47Z","closed_at":"2015-08-11T09:39:46Z","merged_at":null,"merge_commit_sha":"10d7a9cd0149926a05aba6b6acc76de245b1778f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5/commits","review_comments_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5/comments","review_comment_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/5/comments","statuses_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/statuses/6fe2238e82e47992af09db4871489aa41b948fbc","head":{"label":"remicollet:issue-ret","ref":"issue-ret","sha":"6fe2238e82e47992af09db4871489aa41b948fbc","user":{"login":"remicollet","id":270445,"avatar_url":"https://avatars.githubusercontent.com/u/270445?v=3","gravatar_id":"","url":"https://api.github.com/users/remicollet","html_url":"https://github.com/remicollet","followers_url":"https://api.github.com/users/remicollet/followers","following_url":"https://api.github.com/users/remicollet/following{/other_user}","gists_url":"https://api.github.com/users/remicollet/gists{/gist_id}","starred_url":"https://api.github.com/users/remicollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remicollet/subscriptions","organizations_url":"https://api.github.com/users/remicollet/orgs","repos_url":"https://api.github.com/users/remicollet/repos","events_url":"https://api.github.com/users/remicollet/events{/privacy}","received_events_url":"https://api.github.com/users/remicollet/received_events","type":"User","site_admin":false},"repo":{"id":38375972,"name":"tc-lib-barcode","full_name":"remicollet/tc-lib-barcode","owner":{"login":"remicollet","id":270445,"avatar_url":"https://avatars.githubusercontent.com/u/270445?v=3","gravatar_id":"","url":"https://api.github.com/users/remicollet","html_url":"https://github.com/remicollet","followers_url":"https://api.github.com/users/remicollet/followers","following_url":"https://api.github.com/users/remicollet/following{/other_user}","gists_url":"https://api.github.com/users/remicollet/gists{/gist_id}","starred_url":"https://api.github.com/users/remicollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remicollet/subscriptions","organizations_url":"https://api.github.com/users/remicollet/orgs","repos_url":"https://api.github.com/users/remicollet/repos","events_url":"https://api.github.com/users/remicollet/events{/privacy}","received_events_url":"https://api.github.com/users/remicollet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/remicollet/tc-lib-barcode","description":"PHP classes to generate linear and bidimensional barcodes","fork":true,"url":"https://api.github.com/repos/remicollet/tc-lib-barcode","forks_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/forks","keys_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/teams","hooks_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/hooks","issue_events_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/issues/events{/number}","events_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/events","assignees_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/assignees{/user}","branches_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/branches{/branch}","tags_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/tags","blobs_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/statuses/{sha}","languages_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/languages","stargazers_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/stargazers","contributors_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/contributors","subscribers_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/subscribers","subscription_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/subscription","commits_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/contents/{+path}","compare_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/merges","archive_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/downloads","issues_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/issues{/number}","pulls_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/pulls{/number}","milestones_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/milestones{/number}","notifications_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/labels{/name}","releases_url":"https://api.github.com/repos/remicollet/tc-lib-barcode/releases{/id}","created_at":"2015-07-01T14:33:49Z","updated_at":"2015-07-01T14:33:50Z","pushed_at":"2015-08-11T09:39:12Z","git_url":"git://github.com/remicollet/tc-lib-barcode.git","ssh_url":"git@github.com:remicollet/tc-lib-barcode.git","clone_url":"https://github.com/remicollet/tc-lib-barcode.git","svn_url":"https://github.com/remicollet/tc-lib-barcode","homepage":null,"size":262,"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":"develop"}},"base":{"label":"tecnickcom:develop","ref":"develop","sha":"0ce5753224746de427c3b52c31b4a6fa24e644d2","user":{"login":"tecnickcom","id":4163527,"avatar_url":"https://avatars.githubusercontent.com/u/4163527?v=3","gravatar_id":"","url":"https://api.github.com/users/tecnickcom","html_url":"https://github.com/tecnickcom","followers_url":"https://api.github.com/users/tecnickcom/followers","following_url":"https://api.github.com/users/tecnickcom/following{/other_user}","gists_url":"https://api.github.com/users/tecnickcom/gists{/gist_id}","starred_url":"https://api.github.com/users/tecnickcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tecnickcom/subscriptions","organizations_url":"https://api.github.com/users/tecnickcom/orgs","repos_url":"https://api.github.com/users/tecnickcom/repos","events_url":"https://api.github.com/users/tecnickcom/events{/privacy}","received_events_url":"https://api.github.com/users/tecnickcom/received_events","type":"Organization","site_admin":false},"repo":{"id":33490580,"name":"tc-lib-barcode","full_name":"tecnickcom/tc-lib-barcode","owner":{"login":"tecnickcom","id":4163527,"avatar_url":"https://avatars.githubusercontent.com/u/4163527?v=3","gravatar_id":"","url":"https://api.github.com/users/tecnickcom","html_url":"https://github.com/tecnickcom","followers_url":"https://api.github.com/users/tecnickcom/followers","following_url":"https://api.github.com/users/tecnickcom/following{/other_user}","gists_url":"https://api.github.com/users/tecnickcom/gists{/gist_id}","starred_url":"https://api.github.com/users/tecnickcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tecnickcom/subscriptions","organizations_url":"https://api.github.com/users/tecnickcom/orgs","repos_url":"https://api.github.com/users/tecnickcom/repos","events_url":"https://api.github.com/users/tecnickcom/events{/privacy}","received_events_url":"https://api.github.com/users/tecnickcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tecnickcom/tc-lib-barcode","description":"PHP classes to generate linear and bidimensional barcodes","fork":false,"url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode","forks_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/forks","keys_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/teams","hooks_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/hooks","issue_events_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/events{/number}","events_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/events","assignees_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/assignees{/user}","branches_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/branches{/branch}","tags_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/tags","blobs_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/git/refs{/sha}","trees_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/statuses/{sha}","languages_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/languages","stargazers_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/stargazers","contributors_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/contributors","subscribers_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/subscribers","subscription_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/subscription","commits_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/commits{/sha}","git_commits_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/git/commits{/sha}","comments_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/comments{/number}","issue_comment_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/comments{/number}","contents_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/contents/{+path}","compare_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/merges","archive_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/downloads","issues_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues{/number}","pulls_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls{/number}","milestones_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/milestones{/number}","notifications_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/labels{/name}","releases_url":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/releases{/id}","created_at":"2015-04-06T15:56:38Z","updated_at":"2015-05-06T10:46:56Z","pushed_at":"2015-08-11T09:39:26Z","git_url":"git://github.com/tecnickcom/tc-lib-barcode.git","ssh_url":"git@github.com:tecnickcom/tc-lib-barcode.git","clone_url":"https://github.com/tecnickcom/tc-lib-barcode.git","svn_url":"https://github.com/tecnickcom/tc-lib-barcode","homepage":null,"size":439,"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":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5"},"html":{"href":"https://github.com/tecnickcom/tc-lib-barcode/pull/5"},"issue":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/5"},"comments":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/tecnickcom/tc-lib-barcode/statuses/6fe2238e82e47992af09db4871489aa41b948fbc"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"commits":4,"additions":70,"deletions":9,"changed_files":4}}