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

Breadcrumb

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

class AtLeastVersionCommand

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This class is not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • class \PHPUnit\TextUI\Command\AtLeastVersionCommand implements \PHPUnit\TextUI\Command\Command

Expanded class hierarchy of AtLeastVersionCommand

1 file declares its use of AtLeastVersionCommand
Application.php in vendor/phpunit/phpunit/src/TextUI/Application.php

File

vendor/phpunit/phpunit/src/TextUI/Command/Commands/AtLeastVersionCommand.php, line 20

Namespace

PHPUnit\TextUI\Command
View source
final class AtLeastVersionCommand implements Command {
    private readonly string $version;
    public function __construct(string $version) {
        $this->version = $version;
    }
    public function execute() : Result {
        if (version_compare(Version::id(), $this->version, '>=')) {
            return Result::from();
        }
        return Result::from('', Result::FAILURE);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
AtLeastVersionCommand::$version private property
AtLeastVersionCommand::execute public function Overrides Command::execute
AtLeastVersionCommand::__construct public function

API Navigation

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