From a7fc2ec489aada6062d3a63ddc915004a21e38af Mon Sep 17 00:00:00 2001 From: Django Eijgensteijn Date: Thu, 5 Jan 2017 22:20:42 +0100 Subject: [PATCH] Sorting model docs (#424) --- src/Console/ModelsCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index e91822aa5..b2384e290 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -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, @@ -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;