Skip to content

Commit a7fc2ec

Browse files
django23barryvdh
authored andcommitted
Sorting model docs (#424)
1 parent 8caca94 commit a7fc2ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Console/ModelsCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ protected function getPropertiesFromMethods($model)
377377
{
378378
$methods = get_class_methods($model);
379379
if ($methods) {
380+
sort($methods);
380381
foreach ($methods as $method) {
381382
if (Str::startsWith($method, 'get') && Str::endsWith(
382383
$method,
@@ -569,6 +570,8 @@ protected function createPhpDocs($class)
569570
$phpdoc->appendTag($tag);
570571
}
571572

573+
ksort($this->methods);
574+
572575
foreach ($this->methods as $name => $method) {
573576
if (in_array($name, $methods)) {
574577
continue;

0 commit comments

Comments
 (0)