<?php

declare(strict_types=1);

namespace ReallySimplePlugins\RSS\Core\Features\Vulnerability\Interfaces;

/**
 * Defines the read-only contract for an installed component representation.
 *
 * Constraints: Exposes component state only; no persistence or business logic.
 */
interface InstalledComponentInterface
{
    /**
     * @return non-empty-string
     */
    public function getType(): string;

    /**
     * @return non-empty-string
     */
    public function getSlug(): string;

    /**
     * @return non-empty-string
     */
    public function getName(): string;

    /**
     * @return non-empty-string
     */
    public function getInstalledVersion(): string;

    /**
     * @return non-empty-string|null
     */
    public function getLatestVersion(): ?string;

    public function hasUpdate(): bool;
}
