Skip to content

Question: does a sniff exist to enforce this way of writing a ternary statement? #2610

Open
@u01jmg3

Description

@u01jmg3
// Disallow
(empty($string)) ? $string = 'Blank' : $string = 'Filled';

// Allow
$string = (empty($string)) ? 'Blank' : 'Filled';

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions