You are here

protected function DeprecationAnalyzer::analyzeTwigTemplates in Upgrade Status 8.3

Same name and namespace in other branches
  1. 8.2 src/DeprecationAnalyzer.php \Drupal\upgrade_status\DeprecationAnalyzer::analyzeTwigTemplates()

Analyzes twig templates for calls of deprecated code.

Parameters

$directory: The directory which Twig templates should be analyzed.

Return value

array

1 call to DeprecationAnalyzer::analyzeTwigTemplates()
DeprecationAnalyzer::analyze in src/DeprecationAnalyzer.php
Analyze the codebase of an extension including all its sub-components.

File

src/DeprecationAnalyzer.php, line 542

Class

DeprecationAnalyzer

Namespace

Drupal\upgrade_status

Code

protected function analyzeTwigTemplates($directory) {
  $iterator = new TemplateDirIterator(new TwigRecursiveIterator($directory));
  return (new DeprecationCollector($this->twigEnvironment))
    ->collect($iterator);
}