Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ComplexityCollection.php

function ComplexityCollection::sortByDescendingCyclomaticComplexity

File

vendor/sebastian/complexity/src/Complexity/ComplexityCollection.php, line 118

Class

ComplexityCollection
@psalm-immutable

Namespace

SebastianBergmann\Complexity

Code

public function sortByDescendingCyclomaticComplexity() : self {
    $items = $this->items;
    usort($items, static function (Complexity $a, Complexity $b) : int {
        return $a->cyclomaticComplexity() <=> $b->cyclomaticComplexity();
    });
    return new self(array_reverse($items));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal