-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReaderInterface.php
More file actions
63 lines (55 loc) · 1.76 KB
/
ReaderInterface.php
File metadata and controls
63 lines (55 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
declare(strict_types=1);
/**
* This file is part of fast-forward/dev-tools.
*
* This source file is subject to the license bundled
* with this source code in the file LICENSE.
*
* @copyright Copyright (c) 2026 Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
* @license https://opensource.org/licenses/MIT MIT License
*
* @see https://github.com/php-fast-forward/dev-tools
* @see https://github.com/php-fast-forward
* @see https://datatracker.ietf.org/doc/html/rfc2119
*/
namespace FastForward\DevTools\License;
/**
* Reads and exposes metadata from composer.json for license generation.
*
* This interface provides access to license information, package name,
* authors, vendor, and year data extracted from a project's composer.json.
*/
interface ReaderInterface
{
/**
* Retrieves the license identifier from composer.json.
*
* @return string|null the license string, or null if not set or unsupported
*/
public function getLicense(): ?string;
/**
* Retrieves the package name from composer.json.
*
* @return string the full package name (vendor/package)
*/
public function getPackageName(): string;
/**
* Retrieves the list of authors from composer.json.
*
* @return array<int, array{name: string, email: string, homepage: string, role: string}>
*/
public function getAuthors(): array;
/**
* Extracts the vendor name from the package name.
*
* @return string|null the vendor name, or null if package has no vendor prefix
*/
public function getVendor(): ?string;
/**
* Returns the current year for copyright notices.
*
* @return int the current year as an integer
*/
public function getYear(): int;
}