Skip to content

Generic.ControlStructures.InlineControlStructure fix creates syntax error fixing if-try/catch #1253

@gseric

Description

@gseric

This fixer generates invalid PHP code in some cases. E.g.:

// Original code: if (true) try { } catch(Exception $e) { } // After fix (syntax error!!!): if (true) { try { } } catch(Exception $e) { } // Should be: if (true) { try { } catch(Exception $e) { } }

try/catch is not treated as a whole...

PHP_CodeSniffer 2.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions