{"action":"created","comment":{"url":"https://api.github.com/repos/shopsys/shopsys/pulls/comments/189808323","pull_request_review_id":122056186,"id":189808323,"diff_hunk":"@@ -119,13 +120,31 @@ public function addTransport(Transport $transport)\n     public function setTransports(array $transports)\n     {\n         $this->transports->clear();\n+\n         foreach ($transports as $transport) {\n             $this->addTransport($transport);\n         }\n     }\n \n     /**\n-     * @return \\Doctrine\\Common\\Collections\\Collection\n+     * @param \\Shopsys\\FrameworkBundle\\Model\\Transport\\Transport $transport\n+     */\n+    public function removeTransport(Transport $transport)\n+    {\n+        $this->transports->removeElement($transport);\n+        $transport->removePayment($this);\n+    }\n+\n+    protected function clearTransports()\n+    {\n+        foreach ($this->transports as $transport) {\n+            $this->removeTransport($transport);\n+            $transport->removePayment($this);","path":"packages/framework/src/Model/Payment/Payment.php","position":44,"original_position":44,"commit_id":"4fec6d855ae58d1bbcc4be6b12678300ebd6db67","original_commit_id":"4fec6d855ae58d1bbcc4be6b12678300ebd6db67","user":{"login":"simara-svatopluk","id":1669982,"avatar_url":"https://avatars3.githubusercontent.com/u/1669982?v=4","gravatar_id":"","url":"https://api.github.com/users/simara-svatopluk","html_url":"https://github.com/simara-svatopluk","followers_url":"https://api.github.com/users/simara-svatopluk/followers","following_url":"https://api.github.com/users/simara-svatopluk/following{/other_user}","gists_url":"https://api.github.com/users/simara-svatopluk/gists{/gist_id}","starred_url":"https://api.github.com/users/simara-svatopluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simara-svatopluk/subscriptions","organizations_url":"https://api.github.com/users/simara-svatopluk/orgs","repos_url":"https://api.github.com/users/simara-svatopluk/repos","events_url":"https://api.github.com/users/simara-svatopluk/events{/privacy}","received_events_url":"https://api.github.com/users/simara-svatopluk/received_events","type":"User","site_admin":false},"body":"`removeTransport` calls also `$transport->removePayment($this)` This duplication will fail","created_at":"2018-05-22T08:02:50Z","updated_at":"2018-05-22T08:07:51Z","html_url":"https://github.com/shopsys/shopsys/pull/129#discussion_r189808323","pull_request_url":"https://api.github.com/repos/shopsys/shopsys/pulls/129","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/comments/189808323"},"html":{"href":"https://github.com/shopsys/shopsys/pull/129#discussion_r189808323"},"pull_request":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/shopsys/shopsys/pulls/129","id":189386868,"html_url":"https://github.com/shopsys/shopsys/pull/129","diff_url":"https://github.com/shopsys/shopsys/pull/129.diff","patch_url":"https://github.com/shopsys/shopsys/pull/129.patch","issue_url":"https://api.github.com/repos/shopsys/shopsys/issues/129","number":129,"state":"open","locked":false,"title":"[US-3944] Admin: Transport detail: Payment now can be assigned to transport","user":{"login":"TomasLudvik","id":5638367,"avatar_url":"https://avatars2.githubusercontent.com/u/5638367?v=4","gravatar_id":"","url":"https://api.github.com/users/TomasLudvik","html_url":"https://github.com/TomasLudvik","followers_url":"https://api.github.com/users/TomasLudvik/followers","following_url":"https://api.github.com/users/TomasLudvik/following{/other_user}","gists_url":"https://api.github.com/users/TomasLudvik/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasLudvik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasLudvik/subscriptions","organizations_url":"https://api.github.com/users/TomasLudvik/orgs","repos_url":"https://api.github.com/users/TomasLudvik/repos","events_url":"https://api.github.com/users/TomasLudvik/events{/privacy}","received_events_url":"https://api.github.com/users/TomasLudvik/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n|Description, reason for the PR| ...\r\n|New feature| Yes\r\n|BC breaks| No\r\n|Fixes issues| https://git.shopsys-framework.com/shopsys/shopsys-framework/issues/50\r\n|Standards and tests pass| Yes\r\n|Have you read and signed our [License Agreement for contributions](https://www.shopsys.com/license-agreement)?| Yes\r\n","created_at":"2018-05-21T13:58:22Z","updated_at":"2018-05-22T08:07:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c491293331072b483d7af5aec6023c000e0af17b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shopsys/shopsys/pulls/129/commits","review_comments_url":"https://api.github.com/repos/shopsys/shopsys/pulls/129/comments","review_comment_url":"https://api.github.com/repos/shopsys/shopsys/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shopsys/shopsys/issues/129/comments","statuses_url":"https://api.github.com/repos/shopsys/shopsys/statuses/4fec6d855ae58d1bbcc4be6b12678300ebd6db67","head":{"label":"shopsys:tl-bb-transport-payment-assignment","ref":"tl-bb-transport-payment-assignment","sha":"4fec6d855ae58d1bbcc4be6b12678300ebd6db67","user":{"login":"shopsys","id":17828168,"avatar_url":"https://avatars3.githubusercontent.com/u/17828168?v=4","gravatar_id":"","url":"https://api.github.com/users/shopsys","html_url":"https://github.com/shopsys","followers_url":"https://api.github.com/users/shopsys/followers","following_url":"https://api.github.com/users/shopsys/following{/other_user}","gists_url":"https://api.github.com/users/shopsys/gists{/gist_id}","starred_url":"https://api.github.com/users/shopsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopsys/subscriptions","organizations_url":"https://api.github.com/users/shopsys/orgs","repos_url":"https://api.github.com/users/shopsys/repos","events_url":"https://api.github.com/users/shopsys/events{/privacy}","received_events_url":"https://api.github.com/users/shopsys/received_events","type":"Organization","site_admin":false},"repo":{"id":119832166,"name":"shopsys","full_name":"shopsys/shopsys","owner":{"login":"shopsys","id":17828168,"avatar_url":"https://avatars3.githubusercontent.com/u/17828168?v=4","gravatar_id":"","url":"https://api.github.com/users/shopsys","html_url":"https://github.com/shopsys","followers_url":"https://api.github.com/users/shopsys/followers","following_url":"https://api.github.com/users/shopsys/following{/other_user}","gists_url":"https://api.github.com/users/shopsys/gists{/gist_id}","starred_url":"https://api.github.com/users/shopsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopsys/subscriptions","organizations_url":"https://api.github.com/users/shopsys/orgs","repos_url":"https://api.github.com/users/shopsys/repos","events_url":"https://api.github.com/users/shopsys/events{/privacy}","received_events_url":"https://api.github.com/users/shopsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shopsys/shopsys","description":"Main repository for maintaining Shopsys Framework packages. Open for ISSUES and PULL REQUESTS. ","fork":false,"url":"https://api.github.com/repos/shopsys/shopsys","forks_url":"https://api.github.com/repos/shopsys/shopsys/forks","keys_url":"https://api.github.com/repos/shopsys/shopsys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shopsys/shopsys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shopsys/shopsys/teams","hooks_url":"https://api.github.com/repos/shopsys/shopsys/hooks","issue_events_url":"https://api.github.com/repos/shopsys/shopsys/issues/events{/number}","events_url":"https://api.github.com/repos/shopsys/shopsys/events","assignees_url":"https://api.github.com/repos/shopsys/shopsys/assignees{/user}","branches_url":"https://api.github.com/repos/shopsys/shopsys/branches{/branch}","tags_url":"https://api.github.com/repos/shopsys/shopsys/tags","blobs_url":"https://api.github.com/repos/shopsys/shopsys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shopsys/shopsys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shopsys/shopsys/git/refs{/sha}","trees_url":"https://api.github.com/repos/shopsys/shopsys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shopsys/shopsys/statuses/{sha}","languages_url":"https://api.github.com/repos/shopsys/shopsys/languages","stargazers_url":"https://api.github.com/repos/shopsys/shopsys/stargazers","contributors_url":"https://api.github.com/repos/shopsys/shopsys/contributors","subscribers_url":"https://api.github.com/repos/shopsys/shopsys/subscribers","subscription_url":"https://api.github.com/repos/shopsys/shopsys/subscription","commits_url":"https://api.github.com/repos/shopsys/shopsys/commits{/sha}","git_commits_url":"https://api.github.com/repos/shopsys/shopsys/git/commits{/sha}","comments_url":"https://api.github.com/repos/shopsys/shopsys/comments{/number}","issue_comment_url":"https://api.github.com/repos/shopsys/shopsys/issues/comments{/number}","contents_url":"https://api.github.com/repos/shopsys/shopsys/contents/{+path}","compare_url":"https://api.github.com/repos/shopsys/shopsys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shopsys/shopsys/merges","archive_url":"https://api.github.com/repos/shopsys/shopsys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shopsys/shopsys/downloads","issues_url":"https://api.github.com/repos/shopsys/shopsys/issues{/number}","pulls_url":"https://api.github.com/repos/shopsys/shopsys/pulls{/number}","milestones_url":"https://api.github.com/repos/shopsys/shopsys/milestones{/number}","notifications_url":"https://api.github.com/repos/shopsys/shopsys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shopsys/shopsys/labels{/name}","releases_url":"https://api.github.com/repos/shopsys/shopsys/releases{/id}","deployments_url":"https://api.github.com/repos/shopsys/shopsys/deployments","created_at":"2018-02-01T12:21:09Z","updated_at":"2018-05-22T06:46:11Z","pushed_at":"2018-05-22T07:34:09Z","git_url":"git://github.com/shopsys/shopsys.git","ssh_url":"git@github.com:shopsys/shopsys.git","clone_url":"https://github.com/shopsys/shopsys.git","svn_url":"https://github.com/shopsys/shopsys","homepage":"https://www.shopsys.com","size":18408,"stargazers_count":64,"watchers_count":64,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":5,"watchers":64,"default_branch":"master"}},"base":{"label":"shopsys:master","ref":"master","sha":"5ae21b61054f5ca7e8ed549b13b555aab610d69f","user":{"login":"shopsys","id":17828168,"avatar_url":"https://avatars3.githubusercontent.com/u/17828168?v=4","gravatar_id":"","url":"https://api.github.com/users/shopsys","html_url":"https://github.com/shopsys","followers_url":"https://api.github.com/users/shopsys/followers","following_url":"https://api.github.com/users/shopsys/following{/other_user}","gists_url":"https://api.github.com/users/shopsys/gists{/gist_id}","starred_url":"https://api.github.com/users/shopsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopsys/subscriptions","organizations_url":"https://api.github.com/users/shopsys/orgs","repos_url":"https://api.github.com/users/shopsys/repos","events_url":"https://api.github.com/users/shopsys/events{/privacy}","received_events_url":"https://api.github.com/users/shopsys/received_events","type":"Organization","site_admin":false},"repo":{"id":119832166,"name":"shopsys","full_name":"shopsys/shopsys","owner":{"login":"shopsys","id":17828168,"avatar_url":"https://avatars3.githubusercontent.com/u/17828168?v=4","gravatar_id":"","url":"https://api.github.com/users/shopsys","html_url":"https://github.com/shopsys","followers_url":"https://api.github.com/users/shopsys/followers","following_url":"https://api.github.com/users/shopsys/following{/other_user}","gists_url":"https://api.github.com/users/shopsys/gists{/gist_id}","starred_url":"https://api.github.com/users/shopsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopsys/subscriptions","organizations_url":"https://api.github.com/users/shopsys/orgs","repos_url":"https://api.github.com/users/shopsys/repos","events_url":"https://api.github.com/users/shopsys/events{/privacy}","received_events_url":"https://api.github.com/users/shopsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shopsys/shopsys","description":"Main repository for maintaining Shopsys Framework packages. Open for ISSUES and PULL REQUESTS. ","fork":false,"url":"https://api.github.com/repos/shopsys/shopsys","forks_url":"https://api.github.com/repos/shopsys/shopsys/forks","keys_url":"https://api.github.com/repos/shopsys/shopsys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shopsys/shopsys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shopsys/shopsys/teams","hooks_url":"https://api.github.com/repos/shopsys/shopsys/hooks","issue_events_url":"https://api.github.com/repos/shopsys/shopsys/issues/events{/number}","events_url":"https://api.github.com/repos/shopsys/shopsys/events","assignees_url":"https://api.github.com/repos/shopsys/shopsys/assignees{/user}","branches_url":"https://api.github.com/repos/shopsys/shopsys/branches{/branch}","tags_url":"https://api.github.com/repos/shopsys/shopsys/tags","blobs_url":"https://api.github.com/repos/shopsys/shopsys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shopsys/shopsys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shopsys/shopsys/git/refs{/sha}","trees_url":"https://api.github.com/repos/shopsys/shopsys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shopsys/shopsys/statuses/{sha}","languages_url":"https://api.github.com/repos/shopsys/shopsys/languages","stargazers_url":"https://api.github.com/repos/shopsys/shopsys/stargazers","contributors_url":"https://api.github.com/repos/shopsys/shopsys/contributors","subscribers_url":"https://api.github.com/repos/shopsys/shopsys/subscribers","subscription_url":"https://api.github.com/repos/shopsys/shopsys/subscription","commits_url":"https://api.github.com/repos/shopsys/shopsys/commits{/sha}","git_commits_url":"https://api.github.com/repos/shopsys/shopsys/git/commits{/sha}","comments_url":"https://api.github.com/repos/shopsys/shopsys/comments{/number}","issue_comment_url":"https://api.github.com/repos/shopsys/shopsys/issues/comments{/number}","contents_url":"https://api.github.com/repos/shopsys/shopsys/contents/{+path}","compare_url":"https://api.github.com/repos/shopsys/shopsys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shopsys/shopsys/merges","archive_url":"https://api.github.com/repos/shopsys/shopsys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shopsys/shopsys/downloads","issues_url":"https://api.github.com/repos/shopsys/shopsys/issues{/number}","pulls_url":"https://api.github.com/repos/shopsys/shopsys/pulls{/number}","milestones_url":"https://api.github.com/repos/shopsys/shopsys/milestones{/number}","notifications_url":"https://api.github.com/repos/shopsys/shopsys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shopsys/shopsys/labels{/name}","releases_url":"https://api.github.com/repos/shopsys/shopsys/releases{/id}","deployments_url":"https://api.github.com/repos/shopsys/shopsys/deployments","created_at":"2018-02-01T12:21:09Z","updated_at":"2018-05-22T06:46:11Z","pushed_at":"2018-05-22T07:34:09Z","git_url":"git://github.com/shopsys/shopsys.git","ssh_url":"git@github.com:shopsys/shopsys.git","clone_url":"https://github.com/shopsys/shopsys.git","svn_url":"https://github.com/shopsys/shopsys","homepage":"https://www.shopsys.com","size":18408,"stargazers_count":64,"watchers_count":64,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":5,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/129"},"html":{"href":"https://github.com/shopsys/shopsys/pull/129"},"issue":{"href":"https://api.github.com/repos/shopsys/shopsys/issues/129"},"comments":{"href":"https://api.github.com/repos/shopsys/shopsys/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shopsys/shopsys/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/shopsys/shopsys/statuses/4fec6d855ae58d1bbcc4be6b12678300ebd6db67"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"simara-svatopluk"}}