DependencyGraphRepositoryInterface.php

Code Hygiene Score: 100

Keine Issues gefunden.

Klassen 1

Funktionen 4

Verwendet von 5

Code

<?php

declare(strict_types=1);

namespace Domain\Repository;

// @responsibility: Contract für Dependency-Graph-Persistenz (code_dependencies Tabelle)

interface DependencyGraphRepositoryInterface
{
    /**
     * Find all files that depend on a given FQCN (reverse lookup for impact analysis).
     *
     * @param string $fqcn The fully qualified class name to search for
     * @param string|null $dependencyType Filter by type (use, extends, implements, trait, constructor)
     * @return array<array{id: int, file_name: string, file_path: string, namespace: string|null, dependency_type: string}>
     */
    public function findDependents(string $fqcn, ?string $dependencyType = null): array;

    /**
     * Get all dependencies for a given analysis ID.
     *
     * @return array<array{dependency_type: string, target_fqcn: string}>
     */
    public function getDependencies(int $analysisId): array;

    /**
     * Get dependency statistics.
     *
     * @return array{total_dependencies: int, by_type: array<string, int>, most_used: array<array{fqcn: string, count: int}>}
     */
    public function getDependencyStatistics(): array;

    /**
     * Get global graph data for entire project.
     *
     * @return array{nodes: array<array<string, mixed>>, links: array<array<string, mixed>>, stats: array<string, int>}
     */
    public function getGlobalGraphData(): array;
}
← Übersicht Graph