Refactor generate-enumerable-trait.php