{"action":"created","comment":{"url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/comments/77787578","id":77787578,"diff_hunk":"@@ -23,50 +20,27 @@\n     private $separator;\n \n     /**\n-     * @api\n-     *\n-     * @param array  $patterns\n+     * @param array  $config\n      * @param string $separator\n-     *\n-     * @return ApplicationConfig\n      */\n-    public static function fromFiles(array $patterns, $separator = '.')\n+    public function __construct(array $config, $separator = '.')\n     {\n-        $locator = new FileLocator();\n-        $files   = $locator->locate($patterns);\n-\n-        if (empty($files)) {\n-            throw NoMatchingFilesException::fromPatterns($patterns);\n-        }\n-\n-        $factory = new ReaderFactory([\n-            '.json' => 'TomPHP\\ConfigServiceProvider\\FileReader\\JSONFileReader',\n-            '.php'  => 'TomPHP\\ConfigServiceProvider\\FileReader\\PHPFileReader',\n-        ]);\n-\n-        $configs = array_map(\n-            function ($filename) use ($factory) {\n-                $reader = $factory->create($filename);\n-\n-                return $reader->read($filename);\n-            },\n-            $files\n-        );\n-\n-        $config = call_user_func_array('array_replace_recursive', $configs);\n+        $this->config    = $config;\n+        $this->separator = $separator;","path":"src/ApplicationConfig.php","position":49,"original_position":49,"commit_id":"24d4042f46c2813fdc97f8b9fa78d88d85f02115","original_commit_id":"24d4042f46c2813fdc97f8b9fa78d88d85f02115","user":{"login":"localheinz","id":605483,"avatar_url":"https://avatars.githubusercontent.com/u/605483?v=3","gravatar_id":"","url":"https://api.github.com/users/localheinz","html_url":"https://github.com/localheinz","followers_url":"https://api.github.com/users/localheinz/followers","following_url":"https://api.github.com/users/localheinz/following{/other_user}","gists_url":"https://api.github.com/users/localheinz/gists{/gist_id}","starred_url":"https://api.github.com/users/localheinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localheinz/subscriptions","organizations_url":"https://api.github.com/users/localheinz/orgs","repos_url":"https://api.github.com/users/localheinz/repos","events_url":"https://api.github.com/users/localheinz/events{/privacy}","received_events_url":"https://api.github.com/users/localheinz/received_events","type":"User","site_admin":false},"body":"@tomphp \r\n\r\nNot sure, should we assert here that `$separator` is a single-line, trimmed, and not-empty `string`?","created_at":"2016-09-07T09:22:57Z","updated_at":"2016-09-07T09:22:57Z","html_url":"https://github.com/tomphp/config-service-provider/pull/37#discussion_r77787578","pull_request_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/comments/77787578"},"html":{"href":"https://github.com/tomphp/config-service-provider/pull/37#discussion_r77787578"},"pull_request":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37","id":84033965,"html_url":"https://github.com/tomphp/config-service-provider/pull/37","diff_url":"https://github.com/tomphp/config-service-provider/pull/37.diff","patch_url":"https://github.com/tomphp/config-service-provider/pull/37.patch","issue_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/37","number":37,"state":"open","locked":false,"title":"Builder","user":{"login":"tomphp","id":1959183,"avatar_url":"https://avatars.githubusercontent.com/u/1959183?v=3","gravatar_id":"","url":"https://api.github.com/users/tomphp","html_url":"https://github.com/tomphp","followers_url":"https://api.github.com/users/tomphp/followers","following_url":"https://api.github.com/users/tomphp/following{/other_user}","gists_url":"https://api.github.com/users/tomphp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomphp/subscriptions","organizations_url":"https://api.github.com/users/tomphp/orgs","repos_url":"https://api.github.com/users/tomphp/repos","events_url":"https://api.github.com/users/tomphp/events{/privacy}","received_events_url":"https://api.github.com/users/tomphp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-05T19:16:17Z","updated_at":"2016-09-07T09:22:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f47fd42cb229a3136c259be68e944c039c77b85b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37/commits","review_comments_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37/comments","review_comment_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/37/comments","statuses_url":"https://api.github.com/repos/tomphp/config-service-provider/statuses/24d4042f46c2813fdc97f8b9fa78d88d85f02115","head":{"label":"tomphp:builder","ref":"builder","sha":"24d4042f46c2813fdc97f8b9fa78d88d85f02115","user":{"login":"tomphp","id":1959183,"avatar_url":"https://avatars.githubusercontent.com/u/1959183?v=3","gravatar_id":"","url":"https://api.github.com/users/tomphp","html_url":"https://github.com/tomphp","followers_url":"https://api.github.com/users/tomphp/followers","following_url":"https://api.github.com/users/tomphp/following{/other_user}","gists_url":"https://api.github.com/users/tomphp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomphp/subscriptions","organizations_url":"https://api.github.com/users/tomphp/orgs","repos_url":"https://api.github.com/users/tomphp/repos","events_url":"https://api.github.com/users/tomphp/events{/privacy}","received_events_url":"https://api.github.com/users/tomphp/received_events","type":"User","site_admin":false},"repo":{"id":32027987,"name":"config-service-provider","full_name":"tomphp/config-service-provider","owner":{"login":"tomphp","id":1959183,"avatar_url":"https://avatars.githubusercontent.com/u/1959183?v=3","gravatar_id":"","url":"https://api.github.com/users/tomphp","html_url":"https://github.com/tomphp","followers_url":"https://api.github.com/users/tomphp/followers","following_url":"https://api.github.com/users/tomphp/following{/other_user}","gists_url":"https://api.github.com/users/tomphp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomphp/subscriptions","organizations_url":"https://api.github.com/users/tomphp/orgs","repos_url":"https://api.github.com/users/tomphp/repos","events_url":"https://api.github.com/users/tomphp/events{/privacy}","received_events_url":"https://api.github.com/users/tomphp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomphp/config-service-provider","description":"A service provider for the League of Extraordinary Packages' Container which allows you to easily add config values to your DI.","fork":false,"url":"https://api.github.com/repos/tomphp/config-service-provider","forks_url":"https://api.github.com/repos/tomphp/config-service-provider/forks","keys_url":"https://api.github.com/repos/tomphp/config-service-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomphp/config-service-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomphp/config-service-provider/teams","hooks_url":"https://api.github.com/repos/tomphp/config-service-provider/hooks","issue_events_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/events{/number}","events_url":"https://api.github.com/repos/tomphp/config-service-provider/events","assignees_url":"https://api.github.com/repos/tomphp/config-service-provider/assignees{/user}","branches_url":"https://api.github.com/repos/tomphp/config-service-provider/branches{/branch}","tags_url":"https://api.github.com/repos/tomphp/config-service-provider/tags","blobs_url":"https://api.github.com/repos/tomphp/config-service-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomphp/config-service-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomphp/config-service-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomphp/config-service-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomphp/config-service-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/tomphp/config-service-provider/languages","stargazers_url":"https://api.github.com/repos/tomphp/config-service-provider/stargazers","contributors_url":"https://api.github.com/repos/tomphp/config-service-provider/contributors","subscribers_url":"https://api.github.com/repos/tomphp/config-service-provider/subscribers","subscription_url":"https://api.github.com/repos/tomphp/config-service-provider/subscription","commits_url":"https://api.github.com/repos/tomphp/config-service-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomphp/config-service-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomphp/config-service-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomphp/config-service-provider/contents/{+path}","compare_url":"https://api.github.com/repos/tomphp/config-service-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomphp/config-service-provider/merges","archive_url":"https://api.github.com/repos/tomphp/config-service-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomphp/config-service-provider/downloads","issues_url":"https://api.github.com/repos/tomphp/config-service-provider/issues{/number}","pulls_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/tomphp/config-service-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/tomphp/config-service-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomphp/config-service-provider/labels{/name}","releases_url":"https://api.github.com/repos/tomphp/config-service-provider/releases{/id}","deployments_url":"https://api.github.com/repos/tomphp/config-service-provider/deployments","created_at":"2015-03-11T16:20:41Z","updated_at":"2016-03-22T12:42:16Z","pushed_at":"2016-09-05T19:29:54Z","git_url":"git://github.com/tomphp/config-service-provider.git","ssh_url":"git@github.com:tomphp/config-service-provider.git","clone_url":"https://github.com/tomphp/config-service-provider.git","svn_url":"https://github.com/tomphp/config-service-provider","homepage":"","size":186,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"tomphp:master","ref":"master","sha":"dcb933913c76ad1a0c1725fae6641e1bea5da421","user":{"login":"tomphp","id":1959183,"avatar_url":"https://avatars.githubusercontent.com/u/1959183?v=3","gravatar_id":"","url":"https://api.github.com/users/tomphp","html_url":"https://github.com/tomphp","followers_url":"https://api.github.com/users/tomphp/followers","following_url":"https://api.github.com/users/tomphp/following{/other_user}","gists_url":"https://api.github.com/users/tomphp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomphp/subscriptions","organizations_url":"https://api.github.com/users/tomphp/orgs","repos_url":"https://api.github.com/users/tomphp/repos","events_url":"https://api.github.com/users/tomphp/events{/privacy}","received_events_url":"https://api.github.com/users/tomphp/received_events","type":"User","site_admin":false},"repo":{"id":32027987,"name":"config-service-provider","full_name":"tomphp/config-service-provider","owner":{"login":"tomphp","id":1959183,"avatar_url":"https://avatars.githubusercontent.com/u/1959183?v=3","gravatar_id":"","url":"https://api.github.com/users/tomphp","html_url":"https://github.com/tomphp","followers_url":"https://api.github.com/users/tomphp/followers","following_url":"https://api.github.com/users/tomphp/following{/other_user}","gists_url":"https://api.github.com/users/tomphp/gists{/gist_id}","starred_url":"https://api.github.com/users/tomphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomphp/subscriptions","organizations_url":"https://api.github.com/users/tomphp/orgs","repos_url":"https://api.github.com/users/tomphp/repos","events_url":"https://api.github.com/users/tomphp/events{/privacy}","received_events_url":"https://api.github.com/users/tomphp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomphp/config-service-provider","description":"A service provider for the League of Extraordinary Packages' Container which allows you to easily add config values to your DI.","fork":false,"url":"https://api.github.com/repos/tomphp/config-service-provider","forks_url":"https://api.github.com/repos/tomphp/config-service-provider/forks","keys_url":"https://api.github.com/repos/tomphp/config-service-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomphp/config-service-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomphp/config-service-provider/teams","hooks_url":"https://api.github.com/repos/tomphp/config-service-provider/hooks","issue_events_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/events{/number}","events_url":"https://api.github.com/repos/tomphp/config-service-provider/events","assignees_url":"https://api.github.com/repos/tomphp/config-service-provider/assignees{/user}","branches_url":"https://api.github.com/repos/tomphp/config-service-provider/branches{/branch}","tags_url":"https://api.github.com/repos/tomphp/config-service-provider/tags","blobs_url":"https://api.github.com/repos/tomphp/config-service-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomphp/config-service-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomphp/config-service-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomphp/config-service-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomphp/config-service-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/tomphp/config-service-provider/languages","stargazers_url":"https://api.github.com/repos/tomphp/config-service-provider/stargazers","contributors_url":"https://api.github.com/repos/tomphp/config-service-provider/contributors","subscribers_url":"https://api.github.com/repos/tomphp/config-service-provider/subscribers","subscription_url":"https://api.github.com/repos/tomphp/config-service-provider/subscription","commits_url":"https://api.github.com/repos/tomphp/config-service-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomphp/config-service-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomphp/config-service-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomphp/config-service-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomphp/config-service-provider/contents/{+path}","compare_url":"https://api.github.com/repos/tomphp/config-service-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomphp/config-service-provider/merges","archive_url":"https://api.github.com/repos/tomphp/config-service-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomphp/config-service-provider/downloads","issues_url":"https://api.github.com/repos/tomphp/config-service-provider/issues{/number}","pulls_url":"https://api.github.com/repos/tomphp/config-service-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/tomphp/config-service-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/tomphp/config-service-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomphp/config-service-provider/labels{/name}","releases_url":"https://api.github.com/repos/tomphp/config-service-provider/releases{/id}","deployments_url":"https://api.github.com/repos/tomphp/config-service-provider/deployments","created_at":"2015-03-11T16:20:41Z","updated_at":"2016-03-22T12:42:16Z","pushed_at":"2016-09-05T19:29:54Z","git_url":"git://github.com/tomphp/config-service-provider.git","ssh_url":"git@github.com:tomphp/config-service-provider.git","clone_url":"https://github.com/tomphp/config-service-provider.git","svn_url":"https://github.com/tomphp/config-service-provider","homepage":"","size":186,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37"},"html":{"href":"https://github.com/tomphp/config-service-provider/pull/37"},"issue":{"href":"https://api.github.com/repos/tomphp/config-service-provider/issues/37"},"comments":{"href":"https://api.github.com/repos/tomphp/config-service-provider/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomphp/config-service-provider/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/tomphp/config-service-provider/statuses/24d4042f46c2813fdc97f8b9fa78d88d85f02115"}}}}
{"actor":{"display_login":"localheinz"}}