{"action":"opened","issue":{"url":"https://api.github.com/repos/elastification/php-client/issues/15","labels_url":"https://api.github.com/repos/elastification/php-client/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/elastification/php-client/issues/15/comments","events_url":"https://api.github.com/repos/elastification/php-client/issues/15/events","html_url":"https://github.com/elastification/php-client/issues/15","id":83838637,"number":15,"title":"[Insight] Boolean should be compared strictly - in src/Serializer/NativeJsonSerializer.php, line 54","user":{"login":"xenji","id":102154,"avatar_url":"https://avatars.githubusercontent.com/u/102154?v=3","gravatar_id":"","url":"https://api.github.com/users/xenji","html_url":"https://github.com/xenji","followers_url":"https://api.github.com/users/xenji/followers","following_url":"https://api.github.com/users/xenji/following{/other_user}","gists_url":"https://api.github.com/users/xenji/gists{/gist_id}","starred_url":"https://api.github.com/users/xenji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenji/subscriptions","organizations_url":"https://api.github.com/users/xenji/orgs","repos_url":"https://api.github.com/users/xenji/repos","events_url":"https://api.github.com/users/xenji/events{/privacy}","received_events_url":"https://api.github.com/users/xenji/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T04:50:41Z","updated_at":"2015-06-02T04:50:41Z","closed_at":null,"body":"**[in src/Serializer/NativeJsonSerializer.php, line 54](https://github.com/elastification/php-client/blob/616d4b173da08f653019587854ceb2c24f59be27/src/Serializer/NativeJsonSerializer.php#L54)**\r\n\r\n> With booleans, only strict comparison (with `!==` operator) should be used to lower bug risks and to improve performances.\r\n\r\n```php\r\n    public function deserialize($data, array $params = array())\r\n    {\r\n        $assoc = $this->useAssoc($params);\r\n        $decodedJson = json_decode($data, $assoc);\r\n\r\n        if ($decodedJson != null) {\r\n            return $this->createGateway($assoc, $decodedJson);\r\n        }\r\n\r\n        // json_last_error_msg is only present in 5.5 and higher.\r\n        if (version_compare(PHP_VERSION, '5.5.0', '>=')) {\r\n```\r\n\r\n---------------------\r\n\r\n_Posted from [SensioLabsInsight](https://insight.sensiolabs.com/projects/205b5f0a-f655-4515-af02-d32351fde447/analyses/12)_"}}