code: public function allowExtensions($extensions)
      {
          if (!is_array($extensions)) {
              $extensions = [$extensions];
          }
          $this->constraints[] = new ExtensionConstraint($extensions);
          return $this;
      }
docs: Set allowed extensions
  
  @param array|string $extensions
  @return $this