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

Breadcrumb

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

function ConsensusStrategy::canBeMet

Overrides StrategyInterface::canBeMet

File

vendor/symfony/lock/Strategy/ConsensusStrategy.php, line 26

Class

ConsensusStrategy
ConsensusStrategy is a StrategyInterface implementation where strictly more than 50% items should be successful.

Namespace

Symfony\Component\Lock\Strategy

Code

public function canBeMet(int $numberOfFailure, int $numberOfItems) : bool {
    return $numberOfFailure < $numberOfItems / 2;
}

API Navigation

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