{"action":"closed","issue":{"url":"https://api.github.com/repos/sergeychernyshev/php-bootstrap/issues/9","repository_url":"https://api.github.com/repos/sergeychernyshev/php-bootstrap","labels_url":"https://api.github.com/repos/sergeychernyshev/php-bootstrap/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/sergeychernyshev/php-bootstrap/issues/9/comments","events_url":"https://api.github.com/repos/sergeychernyshev/php-bootstrap/issues/9/events","html_url":"https://github.com/sergeychernyshev/php-bootstrap/issues/9","id":153571199,"number":9,"title":"[Insight] Logical operators should be avoided - in bootstrap.php, line 88","user":{"login":"sergeychernyshev","id":38076,"avatar_url":"https://avatars.githubusercontent.com/u/38076?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeychernyshev","html_url":"https://github.com/sergeychernyshev","followers_url":"https://api.github.com/users/sergeychernyshev/followers","following_url":"https://api.github.com/users/sergeychernyshev/following{/other_user}","gists_url":"https://api.github.com/users/sergeychernyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeychernyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeychernyshev/subscriptions","organizations_url":"https://api.github.com/users/sergeychernyshev/orgs","repos_url":"https://api.github.com/users/sergeychernyshev/repos","events_url":"https://api.github.com/users/sergeychernyshev/events{/privacy}","received_events_url":"https://api.github.com/users/sergeychernyshev/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-07T03:45:05Z","updated_at":"2016-05-07T03:53:03Z","closed_at":"2016-05-07T03:53:03Z","body":"**[in bootstrap.php, line 88](https://github.com/sergeychernyshev/php-bootstrap/blob/b42193fdd3590e29ce0c370aa5eb70b33e015d2d/bootstrap.php#L88)**\r\n\r\n> The `and` 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\t\t *\r\n\t\t * Full URL that corresponds to the root of the project\r\n\t\t*/\r\n\t\t$https = false;\r\n\t\t$default_port = 80;\r\n\t\tif (array_key_exists('HTTPS', $_SERVER) and $_SERVER['HTTPS'] and $_SERVER['HTTPS'] != 'off') {\r\n\t\t\t$https = true;\r\n\t\t\t$default_port = 443;\r\n\t\t}\r\n\r\n\t\t$hostname = null;\r\n```\r\n\r\n---------------------\r\n\r\n_Posted from [SensioLabsInsight](https://insight.sensiolabs.com/projects/3cd453bb-dd2b-4c59-9310-76b3dd8d778a/analyses/1)_"}}