{"action":"opened","issue":{"url":"https://api.github.com/repos/scrutinizer-ci/php-analyzer/issues/729","labels_url":"https://api.github.com/repos/scrutinizer-ci/php-analyzer/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/scrutinizer-ci/php-analyzer/issues/729/comments","events_url":"https://api.github.com/repos/scrutinizer-ci/php-analyzer/issues/729/events","html_url":"https://github.com/scrutinizer-ci/php-analyzer/issues/729","id":102765854,"number":729,"title":"Not consistent behaviour when returning a mix of types","user":{"login":"m038","id":164319,"avatar_url":"https://avatars.githubusercontent.com/u/164319?v=3","gravatar_id":"","url":"https://api.github.com/users/m038","html_url":"https://github.com/m038","followers_url":"https://api.github.com/users/m038/followers","following_url":"https://api.github.com/users/m038/following{/other_user}","gists_url":"https://api.github.com/users/m038/gists{/gist_id}","starred_url":"https://api.github.com/users/m038/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m038/subscriptions","organizations_url":"https://api.github.com/users/m038/orgs","repos_url":"https://api.github.com/users/m038/repos","events_url":"https://api.github.com/users/m038/events{/privacy}","received_events_url":"https://api.github.com/users/m038/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-24T10:52:27Z","updated_at":"2015-08-24T10:52:27Z","closed_at":null,"body":"I'm getting a _bug_ report from the analyzer that my code might return a mix of types and i should add an additional type check. For my specific case, this is not true. \r\nPlease see the [interface](https://github.com/m038/contentapi-sdk-php/blob/master/src/Superdesk/ContentApiSdk/Client/FileGetContentsClient.php#L56) for an idea of the implementation of my method. This method will only return an array when the fourth parameter _$returnFullResponse_ is set to true. This is enforced in the specs for each class that implements this interface, e.g. [this client](https://github.com/m038/contentapi-sdk-php/blob/master/src/Superdesk/ContentApiSdk/Client/FileGetContentsClient.php#L56).\r\nAs you can see [where](https://github.com/m038/contentapi-sdk-php/blob/master/src/Superdesk/ContentApiSdk/ContentApiSdk.php#L69) i'm calling the method _makeApiCall_ i'm not submitting any fourth parameter, so it defaults to false. Therefore it won't return an Array.\r\n\r\nThe desciption is based on the following issue: https://scrutinizer-ci.com/g/superdesk/contentapi-sdk-php/issues/master/files/src/Superdesk/ContentApiSdk/ContentApiSdk.php?orderField=path&order=asc&issueId=97998666-bbb2-4c40-a362-c6dfdb917998"}}