{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3972","repository_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3972/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3972/comments","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3972/events","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3972","id":350737692,"node_id":"MDU6SXNzdWUzNTA3Mzc2OTI=","number":3972,"title":"Braces fixer does not handle else-if in separate words well","user":{"login":"dennisdahlc","id":17319141,"node_id":"MDQ6VXNlcjE3MzE5MTQx","avatar_url":"https://avatars1.githubusercontent.com/u/17319141?v=4","gravatar_id":"","url":"https://api.github.com/users/dennisdahlc","html_url":"https://github.com/dennisdahlc","followers_url":"https://api.github.com/users/dennisdahlc/followers","following_url":"https://api.github.com/users/dennisdahlc/following{/other_user}","gists_url":"https://api.github.com/users/dennisdahlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dennisdahlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennisdahlc/subscriptions","organizations_url":"https://api.github.com/users/dennisdahlc/orgs","repos_url":"https://api.github.com/users/dennisdahlc/repos","events_url":"https://api.github.com/users/dennisdahlc/events{/privacy}","received_events_url":"https://api.github.com/users/dennisdahlc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T09:05:52Z","updated_at":"2018-08-15T10:36:00Z","closed_at":null,"author_association":"NONE","body":"For configuration or updating questions please read the README and UPGRADE documentation,\r\nor visit: https://gitter.im/PHP-CS-Fixer\r\n\r\nWhen reporting an issue (bug) please provide the following information:\r\n\r\n#### The PHP version you are using (`$ php -v`):\r\n=> 7.2.6\r\n\r\n#### PHP CS Fixer version you are using (`$ php-cs-fixer -V`):\r\n=> 2.12.2\r\n\r\n#### The command you use to run PHP CS Fixer:\r\n=> \r\n\r\n#### The configuration file you are using, if any:\r\n```php\r\n        '@Symfony' => true,\r\n        'binary_operator_spaces' => array(\r\n            'align_double_arrow' => true\r\n        ),\r\n        'concat_space' => false,\r\n        'full_opening_tag' => false,\r\n        'no_closing_tag' => false,\r\n        'no_trailing_whitespace_in_comment' => false,\r\n        'phpdoc_var_without_name' => false,\r\n        'semicolon_after_instruction' => false,\r\n        'trailing_comma_in_multiline_array' => false,\r\n        'yoda_style' => false,\r\n        'function_declaration' => false,\r\n        'single_quote' => false,\r\n        'elseif' => false\r\n```\r\n\r\n#### If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):\r\n * before running PHP CS Fixer (no changes):\r\n```php\r\n     if ($check == 0) {\r\n        $test = 0;\r\n    } else if ($check == 1) {\r\n        $test = 1;\r\n    } else if ($check == 2) {\r\n        $test = 2;\r\n    } else if ($check == 3) {\r\n        $test = 3;\r\n    } else if ($check == 4) {\r\n        $test = 4;\r\n    }\r\n```\r\n\r\n * with unexpected changes applied when running PHP CS Fixer:\r\n```php\r\n    if ($check == 0) {\r\n        $test = 0;\r\n    } else {\r\n        if ($check == 1) {\r\n            $test = 1;\r\n        } else {\r\n            if ($check == 2) {\r\n                $test = 2;\r\n            } else {\r\n                if ($check == 3) {\r\n                    $test = 3;\r\n                } else {\r\n                    if ($check == 4) {\r\n                        $test = 4;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\n\r\n * with the changes you expected instead:\r\n```php\r\n    if ($check == 0) {\r\n        $test = 0;\r\n    } else if ($check == 1) {\r\n        $test = 1;\r\n    } else if ($check == 2) {\r\n        $test = 2;\r\n    } else if ($check == 3) {\r\n        $test = 3;\r\n    } else if ($check == 4) {\r\n        $test = 4;\r\n    }\r\n```\r\nThe problem happens when I use else if in separate words compared to one word.\r\nThe braces fixer in the fixMissingControlBraces method breaks up the else-if statement."},"comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments/413159322","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3972#issuecomment-413159322","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3972","id":413159322,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzE1OTMyMg==","user":{"login":"ntzm","id":3888578,"node_id":"MDQ6VXNlcjM4ODg1Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/3888578?v=4","gravatar_id":"","url":"https://api.github.com/users/ntzm","html_url":"https://github.com/ntzm","followers_url":"https://api.github.com/users/ntzm/followers","following_url":"https://api.github.com/users/ntzm/following{/other_user}","gists_url":"https://api.github.com/users/ntzm/gists{/gist_id}","starred_url":"https://api.github.com/users/ntzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntzm/subscriptions","organizations_url":"https://api.github.com/users/ntzm/orgs","repos_url":"https://api.github.com/users/ntzm/repos","events_url":"https://api.github.com/users/ntzm/events{/privacy}","received_events_url":"https://api.github.com/users/ntzm/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T10:36:00Z","updated_at":"2018-08-15T10:36:00Z","author_association":"CONTRIBUTOR","body":"See #3535"}}
{"actor":{"display_login":"ntzm"}}