]*class=[\'"]([^\'"]+)[\'"]#i', $contents, $matches)) { $classes = array_pop($matches); foreach ($classes as $class) { $classParts = explode('\\', $class); $module = implode('\\', array_slice($classParts, 0, 2)); if (strtolower($currentModule) !== strtolower($module)) { $dependenciesInfo[] = [ 'module' => $module, 'type' => RuleInterface::TYPE_HARD, 'source' => $file, ]; } } } return $dependenciesInfo; } }