{"action":"created","comment":{"url":"https://api.github.com/repos/api-platform/core/pulls/comments/71064669","id":71064669,"diff_hunk":"@@ -0,0 +1,57 @@\n+<?php\n+\n+/*\n+ * This file is part of the API Platform project.\n+ *\n+ * (c) Kévin Dunglas <dunglas@gmail.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace ApiPlatform\\Core\\Bridge\\SimpleThingsEntityAudit\\Metadata\\Resource\\Factory;\n+\n+use ApiPlatform\\Core\\Metadata\\Resource\\Factory\\ResourceMetadataFactoryInterface;\n+use ApiPlatform\\Core\\Metadata\\Resource\\ResourceMetadata;\n+use SimpleThings\\EntityAudit\\AuditManager;\n+\n+/**\n+ * Creates a resource metadata from EntityAudit Entity.\n+ *\n+ * @author Amrouche Hamza <hamza.simperfit@gmail.com>\n+ */\n+final class EntityAuditResourceMetadataFactory implements ResourceMetadataFactoryInterface\n+{\n+    private $resourceMetadataFactory;\n+    private $auditManager;\n+\n+    public function __construct(ResourceMetadataFactoryInterface $resourceMetadataFactory = null, AuditManager $auditManager)\n+    {\n+        $this->resourceMetadataFactory = $resourceMetadataFactory;\n+        $this->auditManager = $auditManager;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function create(string $resourceClass) : ResourceMetadata\n+    {\n+        $resourceClassMetadata = $this->resourceMetadataFactory->create($resourceClass);\n+\n+        if (true === $this->auditManager->getMetadataFactory()->isAudited($resourceClass)) {\n+            $resourceAuditedMetadata = new ResourceMetadata(\n+                    $resourceClassMetadata->getShortName(),","path":"src/Bridge/SimpleThingsEntityAudit/Metadata/Resource/Factory/EntityAuditResourceMetadataFactory.php","position":43,"original_position":43,"commit_id":"c33c59c16b0be10a22b2152a6b1873fbb8000415","original_commit_id":"e45bf5c6c701e65c0a20c91ba1f333d70511b647","user":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars.githubusercontent.com/u/3451634?v=3","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/received_events","type":"User","site_admin":false},"body":"I feel like it is more readable like this, and there is no problem with php-cs / styleci, what is the problem for you in here ? 🐰 ","created_at":"2016-07-16T11:04:00Z","updated_at":"2016-07-16T11:04:00Z","html_url":"https://github.com/api-platform/core/pull/594#discussion_r71064669","pull_request_url":"https://api.github.com/repos/api-platform/core/pulls/594","_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments/71064669"},"html":{"href":"https://github.com/api-platform/core/pull/594#discussion_r71064669"},"pull_request":{"href":"https://api.github.com/repos/api-platform/core/pulls/594"}}},"pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/594","id":76315642,"html_url":"https://github.com/api-platform/core/pull/594","diff_url":"https://github.com/api-platform/core/pull/594.diff","patch_url":"https://github.com/api-platform/core/pull/594.patch","issue_url":"https://api.github.com/repos/api-platform/core/issues/594","number":594,"state":"open","locked":false,"title":"feat: add bridge for entity audit","user":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars.githubusercontent.com/u/3451634?v=3","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/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| Tests pass?   | yes\r\n| Fixed tickets |  none\r\n| License       | MIT\r\n| Doc PR        | todo\r\n\r\nadd bridge to https://github.com/simplethings/EntityAudit\r\n- [x] add tests","created_at":"2016-07-05T17:57:43Z","updated_at":"2016-07-16T11:04:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d72308e997205d6bf1f536eae90c0983fd3f89ca","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/api-platform/core/pulls/594/commits","review_comments_url":"https://api.github.com/repos/api-platform/core/pulls/594/comments","review_comment_url":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/api-platform/core/issues/594/comments","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/c33c59c16b0be10a22b2152a6b1873fbb8000415","head":{"label":"Simperfit:feature/add-bridge-for-entity-audit","ref":"feature/add-bridge-for-entity-audit","sha":"c33c59c16b0be10a22b2152a6b1873fbb8000415","user":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars.githubusercontent.com/u/3451634?v=3","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/received_events","type":"User","site_admin":false},"repo":{"id":53217809,"name":"core","full_name":"Simperfit/core","owner":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars.githubusercontent.com/u/3451634?v=3","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Simperfit/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":true,"url":"https://api.github.com/repos/Simperfit/core","forks_url":"https://api.github.com/repos/Simperfit/core/forks","keys_url":"https://api.github.com/repos/Simperfit/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Simperfit/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Simperfit/core/teams","hooks_url":"https://api.github.com/repos/Simperfit/core/hooks","issue_events_url":"https://api.github.com/repos/Simperfit/core/issues/events{/number}","events_url":"https://api.github.com/repos/Simperfit/core/events","assignees_url":"https://api.github.com/repos/Simperfit/core/assignees{/user}","branches_url":"https://api.github.com/repos/Simperfit/core/branches{/branch}","tags_url":"https://api.github.com/repos/Simperfit/core/tags","blobs_url":"https://api.github.com/repos/Simperfit/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Simperfit/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Simperfit/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/Simperfit/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Simperfit/core/statuses/{sha}","languages_url":"https://api.github.com/repos/Simperfit/core/languages","stargazers_url":"https://api.github.com/repos/Simperfit/core/stargazers","contributors_url":"https://api.github.com/repos/Simperfit/core/contributors","subscribers_url":"https://api.github.com/repos/Simperfit/core/subscribers","subscription_url":"https://api.github.com/repos/Simperfit/core/subscription","commits_url":"https://api.github.com/repos/Simperfit/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/Simperfit/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/Simperfit/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/Simperfit/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/Simperfit/core/contents/{+path}","compare_url":"https://api.github.com/repos/Simperfit/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Simperfit/core/merges","archive_url":"https://api.github.com/repos/Simperfit/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Simperfit/core/downloads","issues_url":"https://api.github.com/repos/Simperfit/core/issues{/number}","pulls_url":"https://api.github.com/repos/Simperfit/core/pulls{/number}","milestones_url":"https://api.github.com/repos/Simperfit/core/milestones{/number}","notifications_url":"https://api.github.com/repos/Simperfit/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Simperfit/core/labels{/name}","releases_url":"https://api.github.com/repos/Simperfit/core/releases{/id}","deployments_url":"https://api.github.com/repos/Simperfit/core/deployments","created_at":"2016-03-05T18:57:36Z","updated_at":"2016-07-16T11:01:42Z","pushed_at":"2016-07-16T11:01:52Z","git_url":"git://github.com/Simperfit/core.git","ssh_url":"git@github.com:Simperfit/core.git","clone_url":"https://github.com/Simperfit/core.git","svn_url":"https://github.com/Simperfit/core","homepage":"https://api-platform.com/doc/1.0/api-bundle/","size":2952,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"api-platform:master","ref":"master","sha":"7d275f0845f60133e86bc027581650101a66519a","user":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars.githubusercontent.com/u/13420081?v=3","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":29501260,"name":"core","full_name":"api-platform/core","owner":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars.githubusercontent.com/u/13420081?v=3","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/api-platform/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":false,"url":"https://api.github.com/repos/api-platform/core","forks_url":"https://api.github.com/repos/api-platform/core/forks","keys_url":"https://api.github.com/repos/api-platform/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/api-platform/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/api-platform/core/teams","hooks_url":"https://api.github.com/repos/api-platform/core/hooks","issue_events_url":"https://api.github.com/repos/api-platform/core/issues/events{/number}","events_url":"https://api.github.com/repos/api-platform/core/events","assignees_url":"https://api.github.com/repos/api-platform/core/assignees{/user}","branches_url":"https://api.github.com/repos/api-platform/core/branches{/branch}","tags_url":"https://api.github.com/repos/api-platform/core/tags","blobs_url":"https://api.github.com/repos/api-platform/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/api-platform/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/api-platform/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/api-platform/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/{sha}","languages_url":"https://api.github.com/repos/api-platform/core/languages","stargazers_url":"https://api.github.com/repos/api-platform/core/stargazers","contributors_url":"https://api.github.com/repos/api-platform/core/contributors","subscribers_url":"https://api.github.com/repos/api-platform/core/subscribers","subscription_url":"https://api.github.com/repos/api-platform/core/subscription","commits_url":"https://api.github.com/repos/api-platform/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/api-platform/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/api-platform/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/api-platform/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/api-platform/core/contents/{+path}","compare_url":"https://api.github.com/repos/api-platform/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/api-platform/core/merges","archive_url":"https://api.github.com/repos/api-platform/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/api-platform/core/downloads","issues_url":"https://api.github.com/repos/api-platform/core/issues{/number}","pulls_url":"https://api.github.com/repos/api-platform/core/pulls{/number}","milestones_url":"https://api.github.com/repos/api-platform/core/milestones{/number}","notifications_url":"https://api.github.com/repos/api-platform/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/api-platform/core/labels{/name}","releases_url":"https://api.github.com/repos/api-platform/core/releases{/id}","deployments_url":"https://api.github.com/repos/api-platform/core/deployments","created_at":"2015-01-19T23:05:56Z","updated_at":"2016-07-14T14:02:22Z","pushed_at":"2016-07-16T11:01:52Z","git_url":"git://github.com/api-platform/core.git","ssh_url":"git@github.com:api-platform/core.git","clone_url":"https://github.com/api-platform/core.git","svn_url":"https://github.com/api-platform/core","homepage":"https://api-platform.com","size":3446,"stargazers_count":328,"watchers_count":328,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":101,"forks":88,"open_issues":101,"watchers":328,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/594"},"html":{"href":"https://github.com/api-platform/core/pull/594"},"issue":{"href":"https://api.github.com/repos/api-platform/core/issues/594"},"comments":{"href":"https://api.github.com/repos/api-platform/core/issues/594/comments"},"review_comments":{"href":"https://api.github.com/repos/api-platform/core/pulls/594/comments"},"review_comment":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/api-platform/core/pulls/594/commits"},"statuses":{"href":"https://api.github.com/repos/api-platform/core/statuses/c33c59c16b0be10a22b2152a6b1873fbb8000415"}}}}
{"actor":{"display_login":"Simperfit"}}