shalvah / upgrader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return `Change` objects rather than arrays

shalvah opened this issue · comments

The dryRun method should return an array of Changes, not plain arrays.

$changes = $upgrader->dryRun();

foreach ($changes as $change) {
-  $this->info($change["description"]);
+  $this->info($change->description);
}

Benefits: better autocompletion and type safety, plus possibility of extending with custom methods later.