Run Rector on your code to see what it can do for you:
<?php class Demo { - public static function getOptions() + /** + * @return mixed[] + */ + public static function getOptions(): array { - function sortByOrder(array $a, array $b): int - { - return strcmp((string) $a['label'], (string) $b['label']); - } - $options = [ ['value' => 'b', 'label' => 'Bravo'], ['value' => 'a', 'label' => 'Alpha'],
Applied Rules:
Not a change you expect?
rector.php