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 placeholders in license templates with metadata values.
23 *
24 * This interface defines the contract for replacing template placeholders
25 * such as [year], [author], [project] with actual values.
26 */
27interface PlaceholderResolverInterface
28{
29    /**
30     * Resolves placeholders in a license template with the provided metadata.
31     *
32     * @param string $template The license template content with placeholders
33     * @param array{year?: int, organization?: string, author?: string, project?: string} $metadata The metadata values to use for replacement
34     *
35     * @return string The template with all resolved placeholders
36     */
37    public function resolve(string $template, array $metadata): string;
38}