{"action":"closed","issue":{"url":"https://api.github.com/repos/apitude/apitude/issues/4","labels_url":"https://api.github.com/repos/apitude/apitude/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/apitude/apitude/issues/4/comments","events_url":"https://api.github.com/repos/apitude/apitude/issues/4/events","html_url":"https://github.com/apitude/apitude/issues/4","id":123758690,"number":4,"title":"[Insight] Logical operators should be avoided - in src/API/Controller/ValidatorTrait.php, line 86","user":{"login":"baohx2000","id":486322,"avatar_url":"https://avatars.githubusercontent.com/u/486322?v=3","gravatar_id":"","url":"https://api.github.com/users/baohx2000","html_url":"https://github.com/baohx2000","followers_url":"https://api.github.com/users/baohx2000/followers","following_url":"https://api.github.com/users/baohx2000/following{/other_user}","gists_url":"https://api.github.com/users/baohx2000/gists{/gist_id}","starred_url":"https://api.github.com/users/baohx2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baohx2000/subscriptions","organizations_url":"https://api.github.com/users/baohx2000/orgs","repos_url":"https://api.github.com/users/baohx2000/repos","events_url":"https://api.github.com/users/baohx2000/events{/privacy}","received_events_url":"https://api.github.com/users/baohx2000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-24T05:01:04Z","updated_at":"2015-12-24T05:03:19Z","closed_at":"2015-12-24T05:03:19Z","body":"**[in src/API/Controller/ValidatorTrait.php, line 86](https://github.com/apitude/apitude/blob/5e54c7c31a4c1ce4bf653911b2036140abfe40c3/src/API/Controller/ValidatorTrait.php#L86)**\r\n\r\n> The `or` operator does not have the same precedence as `||`.\r\n            This could lead to unexpected behavior, use `||` instead.\r\n\r\n```php\r\n        $currentPointer = &$errors;\r\n\r\n        while (count($path) > 0) {\r\n            $currentField = array_shift($path);\r\n\r\n            if (! array_key_exists($currentField, $currentPointer) or ! is_array($currentPointer[$currentField])) {\r\n                $currentPointer[$currentField] = [];\r\n            }\r\n\r\n            if (is_numeric($currentField)) {\r\n                for ($i = 0; $i < (int) $currentField; $i++) {\r\n```\r\n\r\n---------------------\r\n\r\n_Posted from [SensioLabsInsight](https://insight.sensiolabs.com/projects/fa261a9c-1e92-4e36-8271-f17972779e2e/analyses/1)_"}}