GitHub PullRequestReviewCommentEvent at 2014-08-01 20:50:21
Repository: cakephp
Actor: TamiasSibiricus
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/15718264","id":15718264,"diff_hunk":"@@ -114,4 +114,25 @@ protected function _getFilePath($key) {\n \t\treturn $file;\n \t}\n \n+    protected function var_export($var, $indent=\"\") {\n+        switch (gettype($var)) {\n+            case \"string\":\n+                //return \"'\" . addcslashes($var, \"\\\\\\$\\\"\\r\\n\\t\\v\\f\") . \"'\";\n+                return \"'\" . str_replace(\"'\", '\\'',$var) . \"'\";\n+            case \"array\":\n+                $indexed = array_keys($var) === range(0, count($var) - 1);\n+                $r = [];\n+                foreach ($var as $key => $value) {\n+                    $r[] = \"$indent    \"\n+                        . ($indexed ? \"\" : $this->var_export($key) . \" => \")\n+                        . $this->var_export($value, \"$indent    \");\n+                }\n+                return \"[\\n\" . implode(\",\\n\", $r) . \"\\n\" . $indent . \"]\";\n+            case \"boolean\":\n+                return $var ? \"true\" : \"false\";\n+            default:\n+                return var_export($var, TRUE);\n+        }","path":"src/Configure/Engine/PhpConfig.php","position":31,"original_position":31,"commit_id":"1138aba7ca254a47c3baa901ad817ca49f455b06","original_commit_id":"1138aba7ca254a47c3baa901ad817ca49f455b06","user":{"login":"TamiasSibiricus","id":648814,"avatar_url":"https://avatars.githubusercontent.com/u/648814?v=1","gravatar_id":"4b80f322c39ca12273b6214b2d145866","url":"https://api.github.com/users/TamiasSibiricus","html_url":"https://github.com/TamiasSibiricus","followers_url":"https://api.github.com/users/TamiasSibiricus/followers","following_url":"https://api.github.com/users/TamiasSibiricus/following{/other_user}","gists_url":"https://api.github.com/users/TamiasSibiricus/gists{/gist_id}","starred_url":"https://api.github.com/users/TamiasSibiricus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TamiasSibiricus/subscriptions","organizations_url":"https://api.github.com/users/TamiasSibiricus/orgs","repos_url":"https://api.github.com/users/TamiasSibiricus/repos","events_url":"https://api.github.com/users/TamiasSibiricus/events{/privacy}","received_events_url":"https://api.github.com/users/TamiasSibiricus/received_events","type":"User","site_admin":false},"body":"@markstory You are right. Very similar methods. But there is one little thing. It would be nice to use in config files idents. After review several Fixtures I noticed that a pretty format and indents is missing. I think it will be a little difficult to read files without pretty format. I'll try to play with Cake\\Console\\Command\\Task\\FixtureTask::_values() as prototype tomorrow. ","created_at":"2014-08-01T20:50:21Z","updated_at":"2014-08-01T20:50:21Z","html_url":"https://github.com/cakephp/cakephp/pull/4139#discussion_r15718264","pull_request_url":"https://api.github.com/repos/cakephp/cakephp/pulls/4139","_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/15718264"},"html":{"href":"https://github.com/cakephp/cakephp/pull/4139#discussion_r15718264"},"pull_request":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/4139"}}},"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/4139","id":19231952,"html_url":"https://github.com/cakephp/cakephp/pull/4139","diff_url":"https://github.com/cakephp/cakephp/pull/4139.diff","patch_url":"https://github.com/cakephp/cakephp/pull/4139.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/4139","number":4139,"state":"open","title":"3.0 PhpConfig rework to complain php5.4 array syntax","user":{"login":"TamiasSibiricus","id":648814,"avatar_url":"https://avatars.githubusercontent.com/u/648814?v=1","gravatar_id":"4b80f322c39ca12273b6214b2d145866","url":"https://api.github.com/users/TamiasSibiricus","html_url":"https://github.com/TamiasSibiricus","followers_url":"https://api.github.com/users/TamiasSibiricus/followers","following_url":"https://api.github.com/users/TamiasSibiricus/following{/other_user}","gists_url":"https://api.github.com/users/TamiasSibiricus/gists{/gist_id}","starred_url":"https://api.github.com/users/TamiasSibiricus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TamiasSibiricus/subscriptions","organizations_url":"https://api.github.com/users/TamiasSibiricus/orgs","repos_url":"https://api.github.com/users/TamiasSibiricus/repos","events_url":"https://api.github.com/users/TamiasSibiricus/events{/privacy}","received_events_url":"https://api.github.com/users/TamiasSibiricus/received_events","type":"User","site_admin":false},"body":"var_export return arrays in old format like:\r\n\r\n~~~\r\narray (\r\n  0 => 1,\r\n  1 => 2,\r\n  2 => \r\n  array (\r\n    0 => 'a',\r\n    1 => 'b',\r\n    2 => 'c',\r\n  ),\r\n)\r\n~~~\r\n\r\nI think php5.4 format more readable in config files\r\n~~~\r\n[\r\n  0 => 1,\r\n  1 => 2,\r\n  2 => \r\n  [\r\n    0 => 'a',\r\n    1 => 'b',\r\n    2 => 'c',\r\n  ],\r\n]\r\n~~~\r\nAny ideas?","created_at":"2014-08-01T20:24:47Z","updated_at":"2014-08-01T20:50:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c854269a361ba33e6494ac2614835d0ddc406ad","assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/7/labels","id":453043,"number":7,"title":"3.0.0","description":"New major release that breaks compatibility with 2.x\r\n\r\n- PHP5.4.19+\r\n- New ORM & behaviors.\r\n- Improved Routing\r\n- PSR-0 and composer support.\r\n- Simpler configuration and bootstrapping.\r\n- Improved configuration handling.\r\n- Improved bake.\r\n\r\nSee [the roadmap](http://github.com/cakephp/cakephp/wiki/3.0-roadmap) for more details.","creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=1","gravatar_id":"4ef95846cf708177ecfcec8a92325b95","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":49,"closed_issues":1009,"state":"open","created_at":"2013-10-11T20:56:23Z","updated_at":"2014-08-01T20:26:52Z","due_on":null},"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/4139/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/4139/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/4139/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/1138aba7ca254a47c3baa901ad817ca49f455b06","head":{"label":"TamiasSibiricus:3.0-phpconfig","ref":"3.0-phpconfig","sha":"1138aba7ca254a47c3baa901ad817ca49f455b06","user":{"login":"TamiasSibiricus","id":648814,"avatar_url":"https://avatars.githubusercontent.com/u/648814?v=1","gravatar_id":"4b80f322c39ca12273b6214b2d145866","url":"https://api.github.com/users/TamiasSibiricus","html_url":"https://github.com/TamiasSibiricus","followers_url":"https://api.github.com/users/TamiasSibiricus/followers","following_url":"https://api.github.com/users/TamiasSibiricus/following{/other_user}","gists_url":"https://api.github.com/users/TamiasSibiricus/gists{/gist_id}","starred_url":"https://api.github.com/users/TamiasSibiricus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TamiasSibiricus/subscriptions","organizations_url":"https://api.github.com/users/TamiasSibiricus/orgs","repos_url":"https://api.github.com/users/TamiasSibiricus/repos","events_url":"https://api.github.com/users/TamiasSibiricus/events{/privacy}","received_events_url":"https://api.github.com/users/TamiasSibiricus/received_events","type":"User","site_admin":false},"repo":{"id":21766464,"name":"cakephp","full_name":"TamiasSibiricus/cakephp","owner":{"login":"TamiasSibiricus","id":648814,"avatar_url":"https://avatars.githubusercontent.com/u/648814?v=1","gravatar_id":"4b80f322c39ca12273b6214b2d145866","url":"https://api.github.com/users/TamiasSibiricus","html_url":"https://github.com/TamiasSibiricus","followers_url":"https://api.github.com/users/TamiasSibiricus/followers","following_url":"https://api.github.com/users/TamiasSibiricus/following{/other_user}","gists_url":"https://api.github.com/users/TamiasSibiricus/gists{/gist_id}","starred_url":"https://api.github.com/users/TamiasSibiricus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TamiasSibiricus/subscriptions","organizations_url":"https://api.github.com/users/TamiasSibiricus/orgs","repos_url":"https://api.github.com/users/TamiasSibiricus/repos","events_url":"https://api.github.com/users/TamiasSibiricus/events{/privacy}","received_events_url":"https://api.github.com/users/TamiasSibiricus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TamiasSibiricus/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":true,"url":"https://api.github.com/repos/TamiasSibiricus/cakephp","forks_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/forks","keys_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/teams","hooks_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/hooks","issue_events_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/events","assignees_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/tags","blobs_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/languages","stargazers_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/stargazers","contributors_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/contributors","subscribers_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/subscribers","subscription_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/subscription","commits_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/issues/comments/{number}","contents_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/merges","archive_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/downloads","issues_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/TamiasSibiricus/cakephp/releases{/id}","created_at":"2014-07-12T12:16:29Z","updated_at":"2014-07-12T11:50:44Z","pushed_at":"2014-08-01T20:19:54Z","git_url":"git://github.com/TamiasSibiricus/cakephp.git","ssh_url":"git@github.com:TamiasSibiricus/cakephp.git","clone_url":"https://github.com/TamiasSibiricus/cakephp.git","svn_url":"https://github.com/TamiasSibiricus/cakephp","homepage":"http://cakephp.org","size":56780,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cakephp:3.0","ref":"3.0","sha":"83ffa04076feec6b8a31d0b491a94dfd31c378dd","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=1","gravatar_id":"12cd092be901674cdbf0d3d964e945d5","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=1","gravatar_id":"12cd092be901674cdbf0d3d964e945d5","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/{number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","created_at":"2010-05-08T14:38:22Z","updated_at":"2014-08-01T11:30:35Z","pushed_at":"2014-08-01T16:25:54Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":146683,"stargazers_count":4988,"watchers_count":4988,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2132,"mirror_url":null,"open_issues_count":149,"forks":2132,"open_issues":149,"watchers":4988,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/4139"},"html":{"href":"https://github.com/cakephp/cakephp/pull/4139"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/4139"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/4139/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/4139/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/4139/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/1138aba7ca254a47c3baa901ad817ca49f455b06"}}}}