3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer;
5 use Drupal\drupalmoduleupgrader\AnalyzerBase;
6 use Drupal\drupalmoduleupgrader\TargetInterface;
11 * description = @Translation("Checks if the module defines any classes that need to be moved into a PSR-4 structure."),
14 * "url" = "https://www.drupal.org/node/2246699",
15 * "title" = @Translation("PSR-4 compatible class loader in Drupal core")
19 * "category" = { "misc", "system" }
21 * message = @Translation("Classes must be PSR-4 compliant.")
24 class PSR4 extends AnalyzerBase {
29 public function analyze(TargetInterface $target) {
31 $class_count = $target
34 ->condition('type', 'Pharborist\Objects\ClassNode')
39 if ($class_count > 0) {
40 $issues[] = $this->buildIssue($target);