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

Breadcrumb

  1. Drupal Core 11.1.x

DrupalStubFilesExtension.php

Namespace

mglaman\PHPStanDrupal\Drupal

File

vendor/mglaman/phpstan-drupal/src/Drupal/DrupalStubFilesExtension.php

View source
<?php

declare (strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;

use PHPStan\PhpDoc\StubFilesExtension;
use Symfony\Component\Finder\Finder;
final class DrupalStubFilesExtension implements StubFilesExtension {
    public function getFiles() : array {
        $files = [];
        $finder = Finder::create()->files()
            ->name('*.stub')
            ->in(__DIR__ . '/../../stubs');
        foreach ($finder as $file) {
            $files[] = $file->getPathname();
        }
        return $files;
    }

}

Classes

Title Deprecated Summary
DrupalStubFilesExtension

API Navigation

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