{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/csv/issues/139","labels_url":"https://api.github.com/repos/thephpleague/csv/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/csv/issues/139/comments","events_url":"https://api.github.com/repos/thephpleague/csv/issues/139/events","html_url":"https://github.com/thephpleague/csv/issues/139","id":118865646,"number":139,"title":"returnType is being changed by fetch* methods","user":{"login":"gietos","id":490653,"avatar_url":"https://avatars.githubusercontent.com/u/490653?v=3","gravatar_id":"","url":"https://api.github.com/users/gietos","html_url":"https://github.com/gietos","followers_url":"https://api.github.com/users/gietos/followers","following_url":"https://api.github.com/users/gietos/following{/other_user}","gists_url":"https://api.github.com/users/gietos/gists{/gist_id}","starred_url":"https://api.github.com/users/gietos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gietos/subscriptions","organizations_url":"https://api.github.com/users/gietos/orgs","repos_url":"https://api.github.com/users/gietos/repos","events_url":"https://api.github.com/users/gietos/events{/privacy}","received_events_url":"https://api.github.com/users/gietos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thephpleague/csv/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/thephpleague/csv/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/thephpleague/csv/milestones/1","html_url":"https://github.com/thephpleague/csv/milestones/version%208.0","labels_url":"https://api.github.com/repos/thephpleague/csv/milestones/1/labels","id":1111888,"number":1,"title":"version 8.0","description":"RoadMap to release version 8.0","creator":{"login":"nyamsprod","id":51073,"avatar_url":"https://avatars.githubusercontent.com/u/51073?v=3","gravatar_id":"","url":"https://api.github.com/users/nyamsprod","html_url":"https://github.com/nyamsprod","followers_url":"https://api.github.com/users/nyamsprod/followers","following_url":"https://api.github.com/users/nyamsprod/following{/other_user}","gists_url":"https://api.github.com/users/nyamsprod/gists{/gist_id}","starred_url":"https://api.github.com/users/nyamsprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyamsprod/subscriptions","organizations_url":"https://api.github.com/users/nyamsprod/orgs","repos_url":"https://api.github.com/users/nyamsprod/repos","events_url":"https://api.github.com/users/nyamsprod/events{/privacy}","received_events_url":"https://api.github.com/users/nyamsprod/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":6,"state":"open","created_at":"2015-05-15T09:52:54Z","updated_at":"2015-11-25T16:48:49Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-11-25T15:55:04Z","updated_at":"2015-12-10T12:06:52Z","closed_at":null,"body":"I believe this is simply a typo, but why returnType is being changed to array in the fetch() method:\r\n\r\nhttps://github.com/thephpleague/csv/blob/81d465ed62a0e8da4777964fed82e28d21bbf40f/src/Reader.php#L95\r\n\r\nThat leads to unexpected behavior in some cases. Example:\r\n\r\n```php\r\n$reader = Reader::createFromString('field1,field2' . PHP_EOL . 'value1,value2');\r\n$reader->setReturnType(Reader::TYPE_ITERATOR);\r\nvar_dump(gettype($reader->fetchAssoc()));\r\n// object\r\nvar_dump(gettype($reader->fetchAssoc()));\r\n// array\r\n```"},"comment":{"url":"https://api.github.com/repos/thephpleague/csv/issues/comments/163591962","html_url":"https://github.com/thephpleague/csv/issues/139#issuecomment-163591962","issue_url":"https://api.github.com/repos/thephpleague/csv/issues/139","id":163591962,"user":{"login":"nyamsprod","id":51073,"avatar_url":"https://avatars.githubusercontent.com/u/51073?v=3","gravatar_id":"","url":"https://api.github.com/users/nyamsprod","html_url":"https://github.com/nyamsprod","followers_url":"https://api.github.com/users/nyamsprod/followers","following_url":"https://api.github.com/users/nyamsprod/following{/other_user}","gists_url":"https://api.github.com/users/nyamsprod/gists{/gist_id}","starred_url":"https://api.github.com/users/nyamsprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyamsprod/subscriptions","organizations_url":"https://api.github.com/users/nyamsprod/orgs","repos_url":"https://api.github.com/users/nyamsprod/repos","events_url":"https://api.github.com/users/nyamsprod/events{/privacy}","received_events_url":"https://api.github.com/users/nyamsprod/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T12:06:52Z","updated_at":"2015-12-10T12:06:52Z","body":"Documentation is updated could you close this issue if all is good. Thanks in advance"}}