{"action":"created","comment":{"url":"https://api.github.com/repos/alanablett/twig-faker/pulls/comments/47332824","id":47332824,"diff_hunk":"@@ -89,7 +90,6 @@ private function getCachedData($type, $count, $cache_key)\n     private function createNewFakeData($type, $count)\n     {\n         $faker = Factory::create();\n-        $this->fake_data = [];","path":"src/TwigFakerExtension.php","position":12,"original_position":12,"commit_id":"675741c31fee21ecb706109a1896dcb9d66cf719","original_commit_id":"675741c31fee21ecb706109a1896dcb9d66cf719","user":{"login":"tsurowiec","id":4466652,"avatar_url":"https://avatars.githubusercontent.com/u/4466652?v=3","gravatar_id":"","url":"https://api.github.com/users/tsurowiec","html_url":"https://github.com/tsurowiec","followers_url":"https://api.github.com/users/tsurowiec/followers","following_url":"https://api.github.com/users/tsurowiec/following{/other_user}","gists_url":"https://api.github.com/users/tsurowiec/gists{/gist_id}","starred_url":"https://api.github.com/users/tsurowiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsurowiec/subscriptions","organizations_url":"https://api.github.com/users/tsurowiec/orgs","repos_url":"https://api.github.com/users/tsurowiec/repos","events_url":"https://api.github.com/users/tsurowiec/events{/privacy}","received_events_url":"https://api.github.com/users/tsurowiec/received_events","type":"User","site_admin":false},"body":"since the array is cleard in the fakerData methos, it is not needed here :smile: ","created_at":"2015-12-11T08:55:42Z","updated_at":"2015-12-11T08:55:42Z","html_url":"https://github.com/alanablett/twig-faker/pull/1#discussion_r47332824","pull_request_url":"https://api.github.com/repos/alanablett/twig-faker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/comments/47332824"},"html":{"href":"https://github.com/alanablett/twig-faker/pull/1#discussion_r47332824"},"pull_request":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/alanablett/twig-faker/pulls/1","id":53366942,"html_url":"https://github.com/alanablett/twig-faker/pull/1","diff_url":"https://github.com/alanablett/twig-faker/pull/1.diff","patch_url":"https://github.com/alanablett/twig-faker/pull/1.patch","issue_url":"https://api.github.com/repos/alanablett/twig-faker/issues/1","number":1,"state":"open","locked":false,"title":"fix to clearing the $this->fake_data","user":{"login":"tsurowiec","id":4466652,"avatar_url":"https://avatars.githubusercontent.com/u/4466652?v=3","gravatar_id":"","url":"https://api.github.com/users/tsurowiec","html_url":"https://github.com/tsurowiec","followers_url":"https://api.github.com/users/tsurowiec/followers","following_url":"https://api.github.com/users/tsurowiec/following{/other_user}","gists_url":"https://api.github.com/users/tsurowiec/gists{/gist_id}","starred_url":"https://api.github.com/users/tsurowiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsurowiec/subscriptions","organizations_url":"https://api.github.com/users/tsurowiec/orgs","repos_url":"https://api.github.com/users/tsurowiec/repos","events_url":"https://api.github.com/users/tsurowiec/events{/privacy}","received_events_url":"https://api.github.com/users/tsurowiec/received_events","type":"User","site_admin":false},"body":"with the cache introduced, now when you don't use cache, it will still return old data, \r\nsince `$this->fake_data` is not being cleard so the `if($this->fake_data)` resolves to true.\r\n\r\nI have moved `$this->fake_data = []` from `createNewFakeData` to `fakerData`","created_at":"2015-12-11T08:48:53Z","updated_at":"2015-12-11T08:55:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75473a6a8efeae8e5d8c80e8d71f0fd71855eb51","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alanablett/twig-faker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/alanablett/twig-faker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/alanablett/twig-faker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alanablett/twig-faker/issues/1/comments","statuses_url":"https://api.github.com/repos/alanablett/twig-faker/statuses/675741c31fee21ecb706109a1896dcb9d66cf719","head":{"label":"tsurowiec:master","ref":"master","sha":"675741c31fee21ecb706109a1896dcb9d66cf719","user":{"login":"tsurowiec","id":4466652,"avatar_url":"https://avatars.githubusercontent.com/u/4466652?v=3","gravatar_id":"","url":"https://api.github.com/users/tsurowiec","html_url":"https://github.com/tsurowiec","followers_url":"https://api.github.com/users/tsurowiec/followers","following_url":"https://api.github.com/users/tsurowiec/following{/other_user}","gists_url":"https://api.github.com/users/tsurowiec/gists{/gist_id}","starred_url":"https://api.github.com/users/tsurowiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsurowiec/subscriptions","organizations_url":"https://api.github.com/users/tsurowiec/orgs","repos_url":"https://api.github.com/users/tsurowiec/repos","events_url":"https://api.github.com/users/tsurowiec/events{/privacy}","received_events_url":"https://api.github.com/users/tsurowiec/received_events","type":"User","site_admin":false},"repo":{"id":47814678,"name":"twig-faker","full_name":"tsurowiec/twig-faker","owner":{"login":"tsurowiec","id":4466652,"avatar_url":"https://avatars.githubusercontent.com/u/4466652?v=3","gravatar_id":"","url":"https://api.github.com/users/tsurowiec","html_url":"https://github.com/tsurowiec","followers_url":"https://api.github.com/users/tsurowiec/followers","following_url":"https://api.github.com/users/tsurowiec/following{/other_user}","gists_url":"https://api.github.com/users/tsurowiec/gists{/gist_id}","starred_url":"https://api.github.com/users/tsurowiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsurowiec/subscriptions","organizations_url":"https://api.github.com/users/tsurowiec/orgs","repos_url":"https://api.github.com/users/tsurowiec/repos","events_url":"https://api.github.com/users/tsurowiec/events{/privacy}","received_events_url":"https://api.github.com/users/tsurowiec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsurowiec/twig-faker","description":"An extension to add the faker library into twig templates.","fork":true,"url":"https://api.github.com/repos/tsurowiec/twig-faker","forks_url":"https://api.github.com/repos/tsurowiec/twig-faker/forks","keys_url":"https://api.github.com/repos/tsurowiec/twig-faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsurowiec/twig-faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsurowiec/twig-faker/teams","hooks_url":"https://api.github.com/repos/tsurowiec/twig-faker/hooks","issue_events_url":"https://api.github.com/repos/tsurowiec/twig-faker/issues/events{/number}","events_url":"https://api.github.com/repos/tsurowiec/twig-faker/events","assignees_url":"https://api.github.com/repos/tsurowiec/twig-faker/assignees{/user}","branches_url":"https://api.github.com/repos/tsurowiec/twig-faker/branches{/branch}","tags_url":"https://api.github.com/repos/tsurowiec/twig-faker/tags","blobs_url":"https://api.github.com/repos/tsurowiec/twig-faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsurowiec/twig-faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsurowiec/twig-faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsurowiec/twig-faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsurowiec/twig-faker/statuses/{sha}","languages_url":"https://api.github.com/repos/tsurowiec/twig-faker/languages","stargazers_url":"https://api.github.com/repos/tsurowiec/twig-faker/stargazers","contributors_url":"https://api.github.com/repos/tsurowiec/twig-faker/contributors","subscribers_url":"https://api.github.com/repos/tsurowiec/twig-faker/subscribers","subscription_url":"https://api.github.com/repos/tsurowiec/twig-faker/subscription","commits_url":"https://api.github.com/repos/tsurowiec/twig-faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsurowiec/twig-faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsurowiec/twig-faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsurowiec/twig-faker/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsurowiec/twig-faker/contents/{+path}","compare_url":"https://api.github.com/repos/tsurowiec/twig-faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsurowiec/twig-faker/merges","archive_url":"https://api.github.com/repos/tsurowiec/twig-faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsurowiec/twig-faker/downloads","issues_url":"https://api.github.com/repos/tsurowiec/twig-faker/issues{/number}","pulls_url":"https://api.github.com/repos/tsurowiec/twig-faker/pulls{/number}","milestones_url":"https://api.github.com/repos/tsurowiec/twig-faker/milestones{/number}","notifications_url":"https://api.github.com/repos/tsurowiec/twig-faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsurowiec/twig-faker/labels{/name}","releases_url":"https://api.github.com/repos/tsurowiec/twig-faker/releases{/id}","created_at":"2015-12-11T08:33:37Z","updated_at":"2015-12-11T08:33:37Z","pushed_at":"2015-12-11T08:46:44Z","git_url":"git://github.com/tsurowiec/twig-faker.git","ssh_url":"git@github.com:tsurowiec/twig-faker.git","clone_url":"https://github.com/tsurowiec/twig-faker.git","svn_url":"https://github.com/tsurowiec/twig-faker","homepage":"","size":4,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"alanablett:master","ref":"master","sha":"f05cacd6d49dfe4bd7cf13a2a47622fbe1a66226","user":{"login":"alanablett","id":1838355,"avatar_url":"https://avatars.githubusercontent.com/u/1838355?v=3","gravatar_id":"","url":"https://api.github.com/users/alanablett","html_url":"https://github.com/alanablett","followers_url":"https://api.github.com/users/alanablett/followers","following_url":"https://api.github.com/users/alanablett/following{/other_user}","gists_url":"https://api.github.com/users/alanablett/gists{/gist_id}","starred_url":"https://api.github.com/users/alanablett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanablett/subscriptions","organizations_url":"https://api.github.com/users/alanablett/orgs","repos_url":"https://api.github.com/users/alanablett/repos","events_url":"https://api.github.com/users/alanablett/events{/privacy}","received_events_url":"https://api.github.com/users/alanablett/received_events","type":"User","site_admin":false},"repo":{"id":39309977,"name":"twig-faker","full_name":"alanablett/twig-faker","owner":{"login":"alanablett","id":1838355,"avatar_url":"https://avatars.githubusercontent.com/u/1838355?v=3","gravatar_id":"","url":"https://api.github.com/users/alanablett","html_url":"https://github.com/alanablett","followers_url":"https://api.github.com/users/alanablett/followers","following_url":"https://api.github.com/users/alanablett/following{/other_user}","gists_url":"https://api.github.com/users/alanablett/gists{/gist_id}","starred_url":"https://api.github.com/users/alanablett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanablett/subscriptions","organizations_url":"https://api.github.com/users/alanablett/orgs","repos_url":"https://api.github.com/users/alanablett/repos","events_url":"https://api.github.com/users/alanablett/events{/privacy}","received_events_url":"https://api.github.com/users/alanablett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alanablett/twig-faker","description":"An extension to add the faker library into twig templates.","fork":false,"url":"https://api.github.com/repos/alanablett/twig-faker","forks_url":"https://api.github.com/repos/alanablett/twig-faker/forks","keys_url":"https://api.github.com/repos/alanablett/twig-faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alanablett/twig-faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alanablett/twig-faker/teams","hooks_url":"https://api.github.com/repos/alanablett/twig-faker/hooks","issue_events_url":"https://api.github.com/repos/alanablett/twig-faker/issues/events{/number}","events_url":"https://api.github.com/repos/alanablett/twig-faker/events","assignees_url":"https://api.github.com/repos/alanablett/twig-faker/assignees{/user}","branches_url":"https://api.github.com/repos/alanablett/twig-faker/branches{/branch}","tags_url":"https://api.github.com/repos/alanablett/twig-faker/tags","blobs_url":"https://api.github.com/repos/alanablett/twig-faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alanablett/twig-faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alanablett/twig-faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/alanablett/twig-faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alanablett/twig-faker/statuses/{sha}","languages_url":"https://api.github.com/repos/alanablett/twig-faker/languages","stargazers_url":"https://api.github.com/repos/alanablett/twig-faker/stargazers","contributors_url":"https://api.github.com/repos/alanablett/twig-faker/contributors","subscribers_url":"https://api.github.com/repos/alanablett/twig-faker/subscribers","subscription_url":"https://api.github.com/repos/alanablett/twig-faker/subscription","commits_url":"https://api.github.com/repos/alanablett/twig-faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/alanablett/twig-faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/alanablett/twig-faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/alanablett/twig-faker/issues/comments{/number}","contents_url":"https://api.github.com/repos/alanablett/twig-faker/contents/{+path}","compare_url":"https://api.github.com/repos/alanablett/twig-faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alanablett/twig-faker/merges","archive_url":"https://api.github.com/repos/alanablett/twig-faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alanablett/twig-faker/downloads","issues_url":"https://api.github.com/repos/alanablett/twig-faker/issues{/number}","pulls_url":"https://api.github.com/repos/alanablett/twig-faker/pulls{/number}","milestones_url":"https://api.github.com/repos/alanablett/twig-faker/milestones{/number}","notifications_url":"https://api.github.com/repos/alanablett/twig-faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alanablett/twig-faker/labels{/name}","releases_url":"https://api.github.com/repos/alanablett/twig-faker/releases{/id}","created_at":"2015-07-18T19:24:35Z","updated_at":"2015-12-11T08:51:13Z","pushed_at":"2015-12-11T08:48:53Z","git_url":"git://github.com/alanablett/twig-faker.git","ssh_url":"git@github.com:alanablett/twig-faker.git","clone_url":"https://github.com/alanablett/twig-faker.git","svn_url":"https://github.com/alanablett/twig-faker","homepage":"","size":132,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/1"},"html":{"href":"https://github.com/alanablett/twig-faker/pull/1"},"issue":{"href":"https://api.github.com/repos/alanablett/twig-faker/issues/1"},"comments":{"href":"https://api.github.com/repos/alanablett/twig-faker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alanablett/twig-faker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/alanablett/twig-faker/statuses/675741c31fee21ecb706109a1896dcb9d66cf719"}}}}