silverstripe / module-standardiser

Tool that standardises some files in Silverstripe modules
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

FIX Add brackets #49

Closed emteknetnz closed 4 months ago

emteknetnz commented 4 months ago

Turns out you need brackets in this scenario, won't return a bool, instead it returns the value of the property

$o = new stdClass;
$o->abc=123;
var_dump($o->abc ?? '' === 'def');
// int(123)

Also alpha sorts script files so that scripts run in a predictable nature - this is desirable because there's a depedency on dispatch-ci.yml from merge-ups.yml - https://github.com/silverstripe/module-standardiser/blob/main/scripts/cms-any/merge-ups.php#L10