<?php

declare(strict_types=1);

namespace App\Framework\Discovery\Contracts;

use App\Framework\Core\ValueObjects\ClassName;
use App\Framework\Discovery\ValueObjects\FileContext;
use App\Framework\Filesystem\File;

/**
 * Base contract for all discovery visitors
 */
interface DiscoveryVisitor
{
    /**
     * Get the visitor type identifier
     */
    public function getType(): string;

    /**
     * Visit a file for discovery
     */
    public function visitFile(File $file, FileContext $context): void;

    /**
     * Visit a class within a file
     */
    public function visitClass(ClassName $className, FileContext $context): void;

    /**
     * Check if this visitor should process the given file
     */
    public function shouldProcessFile(File $file): bool;

    /**
     * Reset visitor state
     */
    public function reset(): void;
}
