Skip to content

Commit

Permalink
Reincarnation php5
Browse files Browse the repository at this point in the history
  • Loading branch information
Big-Shark committed Jan 26, 2016
1 parent a7843ba commit c5e7d4a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/BuilderClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ public function convert()
}
}

usort($results, function ($a, $b) {
return (int) ('table' === $b['name']);
});
$table = current(array_filter($results, function ($item) {
return 'table' === $item['name'];
}));
unset($results[array_search($table, $results)]);
array_unshift($results, $table);

foreach ($results as $function) {
$args = isset($function['args']) ? $function['args'] : [];
Expand Down

0 comments on commit c5e7d4a

Please sign in to comment.