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

Breadcrumb

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

function Comparator::test

Tests against the target.

File

vendor/symfony/finder/Comparator/Comparator.php, line 51

Class

Comparator
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Finder\Comparator

Code

public function test(mixed $test) : bool {
    return match ($this->operator) {    '>' => $test > $this->target,
        '>=' => $test >= $this->target,
        '<' => $test < $this->target,
        '<=' => $test <= $this->target,
        '!=' => $test != $this->target,
        default => $test == $this->target,
    
    };
}

API Navigation

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