Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/**
6 * This file is part of fast-forward/dev-tools.
7 *
8 * This source file is subject to the license bundled
9 * with this source code in the file LICENSE.
10 *
11 * @copyright Copyright (c) 2026 Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
12 * @license   https://opensource.org/licenses/MIT MIT License
13 *
14 * @see       https://github.com/php-fast-forward/dev-tools
15 * @see       https://github.com/php-fast-forward
16 * @see       https://datatracker.ietf.org/doc/html/rfc2119
17 */
18
19namespace FastForward\DevTools\License;
20
21/**
22 * Resolves license identifiers to their corresponding template filenames.
23 *
24 * This interface checks whether a given license is supported and maps it
25 * to the appropriate license template file for content generation.
26 */
27interface ResolverInterface
28{
29    /**
30     * Checks whether the given license identifier is supported.
31     *
32     * @param string $license The license identifier to check (e.g., "MIT", "Apache-2.0")
33     *
34     * @return bool True if the license is supported, false otherwise
35     */
36    public function isSupported(string $license): bool;
37
38    /**
39     * Resolves a license identifier to its template filename.
40     *
41     * @param string $license The license identifier to resolve
42     *
43     * @return string|null The template filename if supported, or null if not
44     */
45    public function resolve(string $license): ?string;
46}