GitHub PullRequestReviewCommentEvent at 2014-10-02 07:56:01
Repository: Faker
Actor: fzaninotto
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/fzaninotto/Faker/pulls/comments/18326184","id":18326184,"diff_hunk":"@@ -0,0 +1,42 @@\n+<?php\n+\n+namespace Faker\\Test\\Provider\\fi_FI;\n+\n+use Faker\\Generator;\n+use Faker\\Provider\\fi_FI\\Person;\n+\n+class PersonTest extends \\PHPUnit_Framework_TestCase\n+{\n+    /** @var Generator */\n+    protected $faker;\n+\n+    public function setUp()\n+    {\n+        $faker = new Generator();\n+        $faker->addProvider(new Person($faker));\n+        $this->faker = $faker;\n+    }\n+\n+    public function testGeneratedNumbersValidity() {\n+        $someNums = array();\n+        for ($i = 0; $i < 20; $i++) {\n+            $faker = $this->faker;\n+            $someNums[] = array('num' => $faker->safePersonalIdentityNumber(), 'type' => 'safe');\n+            $someNums[] = array('num' => $faker->personalIdentityNumber(), 'type' => 'any');\n+            $someNums[] = array('num' => $faker->personalIdentityNumber(null, null, rand(0,20), rand(60,80)), 'type' => 'any');\n+            $someNums[] = array('num' => $faker->personalIdentityNumber(null, rand(0,1) ? 'male' : 'female', rand(0,20), rand(60,80)), 'type' => 'any');\n+        }\n+        foreach ($someNums as $num) {\n+            $this->assertStringMatchesFormat('%d%d%d%d%d%d%c%d%d%d%c', $num['num']);\n+            $this->assertEquals(1, preg_match('/^(\\d{6})([A\\-])(\\d{3})([0123456789ABCDEFHJKLMNPRSTUVWXY])$/', $num['num'], $matches));\n+            $bday = $matches[1];\n+            $delimiter = $matches[2];\n+            $idPart = $matches[3];\n+            //$checksum = $matches[4];","path":"test/Faker/Provider/fi_FI/PersonTest.php","position":35,"original_position":35,"commit_id":"f3c0a31858c0bb696acbffbc9f1faad0ad9674b7","original_commit_id":"f3c0a31858c0bb696acbffbc9f1faad0ad9674b7","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=2","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"body":"don't commit commented out code","created_at":"2014-10-02T07:56:01Z","updated_at":"2014-10-02T07:56:01Z","html_url":"https://github.com/fzaninotto/Faker/pull/397#discussion_r18326184","pull_request_url":"https://api.github.com/repos/fzaninotto/Faker/pulls/397","_links":{"self":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/comments/18326184"},"html":{"href":"https://github.com/fzaninotto/Faker/pull/397#discussion_r18326184"},"pull_request":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/397"}}},"pull_request":{"url":"https://api.github.com/repos/fzaninotto/Faker/pulls/397","id":20105487,"html_url":"https://github.com/fzaninotto/Faker/pull/397","diff_url":"https://github.com/fzaninotto/Faker/pull/397.diff","patch_url":"https://github.com/fzaninotto/Faker/pull/397.patch","issue_url":"https://api.github.com/repos/fzaninotto/Faker/issues/397","number":397,"state":"open","locked":false,"title":"Finnish additions (personal identity number & iban account format)","user":{"login":"joumak","id":8511459,"avatar_url":"https://avatars.githubusercontent.com/u/8511459?v=2","gravatar_id":"","url":"https://api.github.com/users/joumak","html_url":"https://github.com/joumak","followers_url":"https://api.github.com/users/joumak/followers","following_url":"https://api.github.com/users/joumak/following{/other_user}","gists_url":"https://api.github.com/users/joumak/gists{/gist_id}","starred_url":"https://api.github.com/users/joumak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joumak/subscriptions","organizations_url":"https://api.github.com/users/joumak/orgs","repos_url":"https://api.github.com/users/joumak/repos","events_url":"https://api.github.com/users/joumak/events{/privacy}","received_events_url":"https://api.github.com/users/joumak/received_events","type":"User","site_admin":false},"body":"Hi!\r\n\r\nIt would be nice if these could be added to the repository. \r\n\r\nThanks, \r\nJouni Mäkeläinen","created_at":"2014-08-21T12:11:19Z","updated_at":"2014-10-02T07:56:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1d1258d7c3be31e51a30141d1dd0b430fe7db2c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fzaninotto/Faker/pulls/397/commits","review_comments_url":"https://api.github.com/repos/fzaninotto/Faker/pulls/397/comments","review_comment_url":"https://api.github.com/repos/fzaninotto/Faker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/fzaninotto/Faker/issues/397/comments","statuses_url":"https://api.github.com/repos/fzaninotto/Faker/statuses/f3c0a31858c0bb696acbffbc9f1faad0ad9674b7","head":{"label":"joumak:master","ref":"master","sha":"f3c0a31858c0bb696acbffbc9f1faad0ad9674b7","user":{"login":"joumak","id":8511459,"avatar_url":"https://avatars.githubusercontent.com/u/8511459?v=2","gravatar_id":"","url":"https://api.github.com/users/joumak","html_url":"https://github.com/joumak","followers_url":"https://api.github.com/users/joumak/followers","following_url":"https://api.github.com/users/joumak/following{/other_user}","gists_url":"https://api.github.com/users/joumak/gists{/gist_id}","starred_url":"https://api.github.com/users/joumak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joumak/subscriptions","organizations_url":"https://api.github.com/users/joumak/orgs","repos_url":"https://api.github.com/users/joumak/repos","events_url":"https://api.github.com/users/joumak/events{/privacy}","received_events_url":"https://api.github.com/users/joumak/received_events","type":"User","site_admin":false},"repo":{"id":23179869,"name":"Faker","full_name":"joumak/Faker","owner":{"login":"joumak","id":8511459,"avatar_url":"https://avatars.githubusercontent.com/u/8511459?v=2","gravatar_id":"","url":"https://api.github.com/users/joumak","html_url":"https://github.com/joumak","followers_url":"https://api.github.com/users/joumak/followers","following_url":"https://api.github.com/users/joumak/following{/other_user}","gists_url":"https://api.github.com/users/joumak/gists{/gist_id}","starred_url":"https://api.github.com/users/joumak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joumak/subscriptions","organizations_url":"https://api.github.com/users/joumak/orgs","repos_url":"https://api.github.com/users/joumak/repos","events_url":"https://api.github.com/users/joumak/events{/privacy}","received_events_url":"https://api.github.com/users/joumak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joumak/Faker","description":"Faker is a PHP library that generates fake data for you","fork":true,"url":"https://api.github.com/repos/joumak/Faker","forks_url":"https://api.github.com/repos/joumak/Faker/forks","keys_url":"https://api.github.com/repos/joumak/Faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joumak/Faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joumak/Faker/teams","hooks_url":"https://api.github.com/repos/joumak/Faker/hooks","issue_events_url":"https://api.github.com/repos/joumak/Faker/issues/events{/number}","events_url":"https://api.github.com/repos/joumak/Faker/events","assignees_url":"https://api.github.com/repos/joumak/Faker/assignees{/user}","branches_url":"https://api.github.com/repos/joumak/Faker/branches{/branch}","tags_url":"https://api.github.com/repos/joumak/Faker/tags","blobs_url":"https://api.github.com/repos/joumak/Faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joumak/Faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joumak/Faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/joumak/Faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joumak/Faker/statuses/{sha}","languages_url":"https://api.github.com/repos/joumak/Faker/languages","stargazers_url":"https://api.github.com/repos/joumak/Faker/stargazers","contributors_url":"https://api.github.com/repos/joumak/Faker/contributors","subscribers_url":"https://api.github.com/repos/joumak/Faker/subscribers","subscription_url":"https://api.github.com/repos/joumak/Faker/subscription","commits_url":"https://api.github.com/repos/joumak/Faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/joumak/Faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/joumak/Faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/joumak/Faker/issues/comments/{number}","contents_url":"https://api.github.com/repos/joumak/Faker/contents/{+path}","compare_url":"https://api.github.com/repos/joumak/Faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joumak/Faker/merges","archive_url":"https://api.github.com/repos/joumak/Faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joumak/Faker/downloads","issues_url":"https://api.github.com/repos/joumak/Faker/issues{/number}","pulls_url":"https://api.github.com/repos/joumak/Faker/pulls{/number}","milestones_url":"https://api.github.com/repos/joumak/Faker/milestones{/number}","notifications_url":"https://api.github.com/repos/joumak/Faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joumak/Faker/labels{/name}","releases_url":"https://api.github.com/repos/joumak/Faker/releases{/id}","created_at":"2014-08-21T08:31:07Z","updated_at":"2014-08-21T10:41:52Z","pushed_at":"2014-10-01T12:40:08Z","git_url":"git://github.com/joumak/Faker.git","ssh_url":"git@github.com:joumak/Faker.git","clone_url":"https://github.com/joumak/Faker.git","svn_url":"https://github.com/joumak/Faker","homepage":"","size":3238,"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":"master"}},"base":{"label":"fzaninotto:master","ref":"master","sha":"1ce76e851997c7ac51d7f76e5b4cd01ae50e607f","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=2","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"repo":{"id":2579314,"name":"Faker","full_name":"fzaninotto/Faker","owner":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=2","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fzaninotto/Faker","description":"Faker is a PHP library that generates fake data for you","fork":false,"url":"https://api.github.com/repos/fzaninotto/Faker","forks_url":"https://api.github.com/repos/fzaninotto/Faker/forks","keys_url":"https://api.github.com/repos/fzaninotto/Faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fzaninotto/Faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fzaninotto/Faker/teams","hooks_url":"https://api.github.com/repos/fzaninotto/Faker/hooks","issue_events_url":"https://api.github.com/repos/fzaninotto/Faker/issues/events{/number}","events_url":"https://api.github.com/repos/fzaninotto/Faker/events","assignees_url":"https://api.github.com/repos/fzaninotto/Faker/assignees{/user}","branches_url":"https://api.github.com/repos/fzaninotto/Faker/branches{/branch}","tags_url":"https://api.github.com/repos/fzaninotto/Faker/tags","blobs_url":"https://api.github.com/repos/fzaninotto/Faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fzaninotto/Faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fzaninotto/Faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/fzaninotto/Faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fzaninotto/Faker/statuses/{sha}","languages_url":"https://api.github.com/repos/fzaninotto/Faker/languages","stargazers_url":"https://api.github.com/repos/fzaninotto/Faker/stargazers","contributors_url":"https://api.github.com/repos/fzaninotto/Faker/contributors","subscribers_url":"https://api.github.com/repos/fzaninotto/Faker/subscribers","subscription_url":"https://api.github.com/repos/fzaninotto/Faker/subscription","commits_url":"https://api.github.com/repos/fzaninotto/Faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/fzaninotto/Faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/fzaninotto/Faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/fzaninotto/Faker/issues/comments/{number}","contents_url":"https://api.github.com/repos/fzaninotto/Faker/contents/{+path}","compare_url":"https://api.github.com/repos/fzaninotto/Faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fzaninotto/Faker/merges","archive_url":"https://api.github.com/repos/fzaninotto/Faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fzaninotto/Faker/downloads","issues_url":"https://api.github.com/repos/fzaninotto/Faker/issues{/number}","pulls_url":"https://api.github.com/repos/fzaninotto/Faker/pulls{/number}","milestones_url":"https://api.github.com/repos/fzaninotto/Faker/milestones{/number}","notifications_url":"https://api.github.com/repos/fzaninotto/Faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fzaninotto/Faker/labels{/name}","releases_url":"https://api.github.com/repos/fzaninotto/Faker/releases{/id}","created_at":"2011-10-14T22:49:02Z","updated_at":"2014-10-02T03:30:54Z","pushed_at":"2014-10-01T07:35:37Z","git_url":"git://github.com/fzaninotto/Faker.git","ssh_url":"git@github.com:fzaninotto/Faker.git","clone_url":"https://github.com/fzaninotto/Faker.git","svn_url":"https://github.com/fzaninotto/Faker","homepage":"","size":9457,"stargazers_count":4347,"watchers_count":4347,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":604,"mirror_url":null,"open_issues_count":41,"forks":604,"open_issues":41,"watchers":4347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/397"},"html":{"href":"https://github.com/fzaninotto/Faker/pull/397"},"issue":{"href":"https://api.github.com/repos/fzaninotto/Faker/issues/397"},"comments":{"href":"https://api.github.com/repos/fzaninotto/Faker/issues/397/comments"},"review_comments":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/397/comments"},"review_comment":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/fzaninotto/Faker/pulls/397/commits"},"statuses":{"href":"https://api.github.com/repos/fzaninotto/Faker/statuses/f3c0a31858c0bb696acbffbc9f1faad0ad9674b7"}}}}