Skip to content

Commit

Permalink
Sorting model docs (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
django23 authored and barryvdh committed Jan 5, 2017
1 parent 8caca94 commit a7fc2ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ protected function getPropertiesFromMethods($model)
{
$methods = get_class_methods($model);
if ($methods) {
sort($methods);
foreach ($methods as $method) {
if (Str::startsWith($method, 'get') && Str::endsWith(
$method,
Expand Down Expand Up @@ -569,6 +570,8 @@ protected function createPhpDocs($class)
$phpdoc->appendTag($tag);
}

ksort($this->methods);

foreach ($this->methods as $name => $method) {
if (in_array($name, $methods)) {
continue;
Expand Down

0 comments on commit a7fc2ec

Please sign in to comment.