private function sortMethods(AbstractPhpStruct $model)
 {
     if ($this->config->isSortingEnabled() && ($methodSorting = $this->config->getMethodSorting()) !== false) {
         if (is_string($methodSorting)) {
             $methodSorting = ComparatorFactory::createMethodComparator($methodSorting);
         }
         $model->getMethods()->sort($methodSorting);
     }
 }