{"action":"created","comment":{"url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/comments/34947525","id":34947525,"diff_hunk":"@@ -0,0 +1,154 @@\n+<?php\n+\n+namespace phpDocumentor;\n+\n+final class Phpdoc2XmlToArrayConverter implements XmlConverter\n+{\n+    /**\n+     * @var \\SimpleXMLElement\n+     */\n+    private $xml;\n+\n+    /**\n+     * @param \\SimpleXMLElement $xml\n+     */\n+    public function __construct(\\SimpleXMLElement $xml)\n+    {\n+        $this->xml = $xml;\n+    }\n+\n+    /**\n+     * Converts the phpDocumentor2 configuration xml to an array.\n+     *\n+     * @return array\n+     */\n+    public function convert()\n+    {\n+        $phpDocumentor = $this->xml;\n+\n+        $extensions         = [];\n+        $markers            = [];\n+        $visibility         = 'public';\n+        $defaultPackageName = 'Default';\n+        $template           = 'clean';\n+        $ignoreHidden       = true;\n+        $ignoreSymlinks     = true;\n+\n+        if (isset($phpDocumentor->parser)) {\n+            $extensions = $this->buildExtensionsPart($phpDocumentor->parser);\n+            $markers    = $this->buildMarkersPart($phpDocumentor->parser);\n+\n+            $visibility         = ((string) $phpDocumentor->parser->visibility) ?: $visibility;\n+            $defaultPackageName = ((string) $phpDocumentor->parser->{'default-package-name'}) ?: $defaultPackageName;\n+            $template           = ((string) $phpDocumentor->transformations->template->attributes()->name) ?: $template;\n+\n+            if (isset($phpDocumentor->parser->files)) {\n+                if (isset($phpDocumentor->parser->files->{'ignore-hidden'})) {\n+                    $ignoreHidden = filter_var($phpDocumentor->parser->files->{'ignore-hidden'}, FILTER_VALIDATE_BOOLEAN);\n+                }\n+\n+                if (isset($phpDocumentor->parser->files->{'ignore-symlinks'})) {\n+                    $ignoreSymlinks = filter_var($phpDocumentor->parser->files->{'ignore-symlinks'}, FILTER_VALIDATE_BOOLEAN);\n+                }\n+            }\n+        }\n+\n+        $outputDirectory = ((string) $phpDocumentor->parser->target) ?: 'file://build/docs';\n+        $sourcePath      = ((string) $phpDocumentor->parser->files->directory) ?: 'src';\n+\n+        $phpdoc2Array = [\n+            'phpdocumentor' => [\n+                'paths'     => [\n+                    'output' => (string) (new Dsn($outputDirectory))->getPath(),\n+                    'cache'  => '/tmp/phpdoc-doc-cache'\n+                ],\n+                'versions'  => [\n+                    '1.0.0' => [\n+                        'folder' => '',\n+                        'api'    => [\n+                            'format'               => 'php',\n+                            'source'               => [\n+                                'dsn'   => 'file://.',\n+                                'paths' => [\n+                                    0 => (string) (new Dsn($sourcePath))->getPath(),\n+                                ]\n+                            ],\n+                            'ignore'               => [\n+                                'hidden'   => $ignoreHidden,\n+                                'symlinks' => $ignoreSymlinks,\n+                                'paths'    => [\n+                                    0 => 'src/ServiceDefinitions.php'\n+                                ]\n+                            ],\n+                            'extensions'           => $extensions,\n+                            'visibility'           => $visibility,\n+                            'default-package-name' => $defaultPackageName,\n+                            'markers'              => $markers,\n+                        ],\n+                        'guide'  => [","path":"src/phpDocumentor/Phpdoc2XmlToArrayConverter.php","position":88,"original_position":88,"commit_id":"affc454e7af6445349b612178c5d1a156ad2e771","original_commit_id":"affc454e7af6445349b612178c5d1a156ad2e771","user":{"login":"mvriel","id":193704,"avatar_url":"https://avatars.githubusercontent.com/u/193704?v=3","gravatar_id":"","url":"https://api.github.com/users/mvriel","html_url":"https://github.com/mvriel","followers_url":"https://api.github.com/users/mvriel/followers","following_url":"https://api.github.com/users/mvriel/following{/other_user}","gists_url":"https://api.github.com/users/mvriel/gists{/gist_id}","starred_url":"https://api.github.com/users/mvriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvriel/subscriptions","organizations_url":"https://api.github.com/users/mvriel/orgs","repos_url":"https://api.github.com/users/mvriel/repos","events_url":"https://api.github.com/users/mvriel/events{/privacy}","received_events_url":"https://api.github.com/users/mvriel/received_events","type":"User","site_admin":false},"body":"There is no support for guides with phpDocumentor2, this entry should be removed","created_at":"2015-07-18T13:04:48Z","updated_at":"2015-07-18T13:04:48Z","html_url":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597#discussion_r34947525","pull_request_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597","_links":{"self":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/comments/34947525"},"html":{"href":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597#discussion_r34947525"},"pull_request":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597"}}},"pull_request":{"url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597","id":38273408,"html_url":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597","diff_url":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597.diff","patch_url":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597.patch","issue_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/1597","number":1597,"state":"open","locked":false,"title":"Feature/configuration factory","user":{"login":"rgeraads","id":6044164,"avatar_url":"https://avatars.githubusercontent.com/u/6044164?v=3","gravatar_id":"","url":"https://api.github.com/users/rgeraads","html_url":"https://github.com/rgeraads","followers_url":"https://api.github.com/users/rgeraads/followers","following_url":"https://api.github.com/users/rgeraads/following{/other_user}","gists_url":"https://api.github.com/users/rgeraads/gists{/gist_id}","starred_url":"https://api.github.com/users/rgeraads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgeraads/subscriptions","organizations_url":"https://api.github.com/users/rgeraads/orgs","repos_url":"https://api.github.com/users/rgeraads/repos","events_url":"https://api.github.com/users/rgeraads/events{/privacy}","received_events_url":"https://api.github.com/users/rgeraads/received_events","type":"User","site_admin":false},"body":"The ConfigurationFactory that converts phpdocumento2 / phpdocumento3 xml to an array","created_at":"2015-06-22T20:35:39Z","updated_at":"2015-07-18T13:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75f177abd54b9824c9a31191c57258cf08d48e1d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597/commits","review_comments_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597/comments","review_comment_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/1597/comments","statuses_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/statuses/affc454e7af6445349b612178c5d1a156ad2e771","head":{"label":"rgeraads:feature/configuration-factory","ref":"feature/configuration-factory","sha":"affc454e7af6445349b612178c5d1a156ad2e771","user":{"login":"rgeraads","id":6044164,"avatar_url":"https://avatars.githubusercontent.com/u/6044164?v=3","gravatar_id":"","url":"https://api.github.com/users/rgeraads","html_url":"https://github.com/rgeraads","followers_url":"https://api.github.com/users/rgeraads/followers","following_url":"https://api.github.com/users/rgeraads/following{/other_user}","gists_url":"https://api.github.com/users/rgeraads/gists{/gist_id}","starred_url":"https://api.github.com/users/rgeraads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgeraads/subscriptions","organizations_url":"https://api.github.com/users/rgeraads/orgs","repos_url":"https://api.github.com/users/rgeraads/repos","events_url":"https://api.github.com/users/rgeraads/events{/privacy}","received_events_url":"https://api.github.com/users/rgeraads/received_events","type":"User","site_admin":false},"repo":{"id":26475557,"name":"phpDocumentor2","full_name":"rgeraads/phpDocumentor2","owner":{"login":"rgeraads","id":6044164,"avatar_url":"https://avatars.githubusercontent.com/u/6044164?v=3","gravatar_id":"","url":"https://api.github.com/users/rgeraads","html_url":"https://github.com/rgeraads","followers_url":"https://api.github.com/users/rgeraads/followers","following_url":"https://api.github.com/users/rgeraads/following{/other_user}","gists_url":"https://api.github.com/users/rgeraads/gists{/gist_id}","starred_url":"https://api.github.com/users/rgeraads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgeraads/subscriptions","organizations_url":"https://api.github.com/users/rgeraads/orgs","repos_url":"https://api.github.com/users/rgeraads/repos","events_url":"https://api.github.com/users/rgeraads/events{/privacy}","received_events_url":"https://api.github.com/users/rgeraads/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rgeraads/phpDocumentor2","description":"Documentation Generator for PHP ","fork":true,"url":"https://api.github.com/repos/rgeraads/phpDocumentor2","forks_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/forks","keys_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/teams","hooks_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/hooks","issue_events_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/issues/events{/number}","events_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/events","assignees_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/assignees{/user}","branches_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/branches{/branch}","tags_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/tags","blobs_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/git/refs{/sha}","trees_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/statuses/{sha}","languages_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/languages","stargazers_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/stargazers","contributors_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/contributors","subscribers_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/subscribers","subscription_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/subscription","commits_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/commits{/sha}","git_commits_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/git/commits{/sha}","comments_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/comments{/number}","issue_comment_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/issues/comments{/number}","contents_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/contents/{+path}","compare_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/merges","archive_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/downloads","issues_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/issues{/number}","pulls_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/pulls{/number}","milestones_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/milestones{/number}","notifications_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/labels{/name}","releases_url":"https://api.github.com/repos/rgeraads/phpDocumentor2/releases{/id}","created_at":"2014-11-11T08:12:17Z","updated_at":"2015-03-28T12:13:35Z","pushed_at":"2015-07-12T18:49:05Z","git_url":"git://github.com/rgeraads/phpDocumentor2.git","ssh_url":"git@github.com:rgeraads/phpDocumentor2.git","clone_url":"https://github.com/rgeraads/phpDocumentor2.git","svn_url":"https://github.com/rgeraads/phpDocumentor2","homepage":"http://www.phpdoc.org","size":27257,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"phpDocumentor:develop","ref":"develop","sha":"28441646799aee8dfe1d4cf41b670831fd59558f","user":{"login":"phpDocumentor","id":1239567,"avatar_url":"https://avatars.githubusercontent.com/u/1239567?v=3","gravatar_id":"","url":"https://api.github.com/users/phpDocumentor","html_url":"https://github.com/phpDocumentor","followers_url":"https://api.github.com/users/phpDocumentor/followers","following_url":"https://api.github.com/users/phpDocumentor/following{/other_user}","gists_url":"https://api.github.com/users/phpDocumentor/gists{/gist_id}","starred_url":"https://api.github.com/users/phpDocumentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpDocumentor/subscriptions","organizations_url":"https://api.github.com/users/phpDocumentor/orgs","repos_url":"https://api.github.com/users/phpDocumentor/repos","events_url":"https://api.github.com/users/phpDocumentor/events{/privacy}","received_events_url":"https://api.github.com/users/phpDocumentor/received_events","type":"Organization","site_admin":false},"repo":{"id":761653,"name":"phpDocumentor2","full_name":"phpDocumentor/phpDocumentor2","owner":{"login":"phpDocumentor","id":1239567,"avatar_url":"https://avatars.githubusercontent.com/u/1239567?v=3","gravatar_id":"","url":"https://api.github.com/users/phpDocumentor","html_url":"https://github.com/phpDocumentor","followers_url":"https://api.github.com/users/phpDocumentor/followers","following_url":"https://api.github.com/users/phpDocumentor/following{/other_user}","gists_url":"https://api.github.com/users/phpDocumentor/gists{/gist_id}","starred_url":"https://api.github.com/users/phpDocumentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpDocumentor/subscriptions","organizations_url":"https://api.github.com/users/phpDocumentor/orgs","repos_url":"https://api.github.com/users/phpDocumentor/repos","events_url":"https://api.github.com/users/phpDocumentor/events{/privacy}","received_events_url":"https://api.github.com/users/phpDocumentor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpDocumentor/phpDocumentor2","description":"Documentation Generator for PHP ","fork":false,"url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2","forks_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/forks","keys_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/teams","hooks_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/hooks","issue_events_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/events{/number}","events_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/events","assignees_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/assignees{/user}","branches_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/branches{/branch}","tags_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/tags","blobs_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/statuses/{sha}","languages_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/languages","stargazers_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/stargazers","contributors_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/contributors","subscribers_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/subscribers","subscription_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/subscription","commits_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/contents/{+path}","compare_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/merges","archive_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/downloads","issues_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues{/number}","pulls_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls{/number}","milestones_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/milestones{/number}","notifications_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/labels{/name}","releases_url":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/releases{/id}","created_at":"2010-07-07T12:07:55Z","updated_at":"2015-07-17T04:32:53Z","pushed_at":"2015-07-12T18:49:06Z","git_url":"git://github.com/phpDocumentor/phpDocumentor2.git","ssh_url":"git@github.com:phpDocumentor/phpDocumentor2.git","clone_url":"https://github.com/phpDocumentor/phpDocumentor2.git","svn_url":"https://github.com/phpDocumentor/phpDocumentor2","homepage":"http://www.phpdoc.org","size":34695,"stargazers_count":1483,"watchers_count":1483,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":389,"mirror_url":null,"open_issues_count":227,"forks":389,"open_issues":227,"watchers":1483,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597"},"html":{"href":"https://github.com/phpDocumentor/phpDocumentor2/pull/1597"},"issue":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/1597"},"comments":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/issues/1597/comments"},"review_comments":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597/comments"},"review_comment":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/pulls/1597/commits"},"statuses":{"href":"https://api.github.com/repos/phpDocumentor/phpDocumentor2/statuses/affc454e7af6445349b612178c5d1a156ad2e771"}}}}