{"action":"opened","issue":{"url":"https://api.github.com/repos/aerialship/steel-mq/issues/92","labels_url":"https://api.github.com/repos/aerialship/steel-mq/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/aerialship/steel-mq/issues/92/comments","events_url":"https://api.github.com/repos/aerialship/steel-mq/issues/92/events","html_url":"https://github.com/aerialship/steel-mq/issues/92","id":55150164,"number":92,"title":"[Insight] Boolean should be compared strictly - in src/…/Voter/ApiProjectTokenVoter.php, line 52","user":{"login":"i3or1s","id":1193882,"avatar_url":"https://avatars.githubusercontent.com/u/1193882?v=3","gravatar_id":"","url":"https://api.github.com/users/i3or1s","html_url":"https://github.com/i3or1s","followers_url":"https://api.github.com/users/i3or1s/followers","following_url":"https://api.github.com/users/i3or1s/following{/other_user}","gists_url":"https://api.github.com/users/i3or1s/gists{/gist_id}","starred_url":"https://api.github.com/users/i3or1s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i3or1s/subscriptions","organizations_url":"https://api.github.com/users/i3or1s/orgs","repos_url":"https://api.github.com/users/i3or1s/repos","events_url":"https://api.github.com/users/i3or1s/events{/privacy}","received_events_url":"https://api.github.com/users/i3or1s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-22T12:57:31Z","updated_at":"2015-01-22T12:57:31Z","closed_at":null,"body":"**[in src/AerialShip/SteelMqBundle/Security/Authorization/Voter/ApiProjectTokenVoter.php, line 52](https://github.com/aerialship/steel-mq/blob/a56654d788c21761f4c5e5fae9ed5d83062601f5/src/AerialShip/SteelMqBundle/Security/Authorization/Voter/ApiProjectTokenVoter.php#L52)**\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     *\r\n     * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED\r\n     */\r\n    public function vote(TokenInterface $token, $object, array $attributes)\r\n    {\r\n        if (false == $token instanceof TokenPreAuthenticatedToken) {\r\n            return VoterInterface::ACCESS_ABSTAIN;\r\n        }\r\n        /** @var TokenPreAuthenticatedToken $token */\r\n\r\n        if (false == $object || false == $this->supportsClass(get_class($object))) {\r\n```\r\n\r\n---------------------\r\n\r\n_Posted from [SensioLabsInsight](https://insight.sensiolabs.com/projects/f8def490-0699-47db-b626-3e66d7e93465/analyses/7)_"}}