Skip to content

Commit b0ee260

Browse files
committed
feat(license): enhance documentation for license generation classes and interfaces
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent e418c73 commit b0ee260

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/License/Reader.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function readData(SplFileObject $source): array
6969
* If it's an array with one element, extracts that element.
7070
* Returns null if no license is set or if multiple licenses are specified.
7171
*
72-
* @return string|null The license string, or null if not set or unsupported.
72+
* @return string|null the license string, or null if not set or unsupported
7373
*/
7474
public function getLicense(): ?string
7575
{
@@ -85,7 +85,7 @@ public function getLicense(): ?string
8585
/**
8686
* Retrieves the package name from composer.json.
8787
*
88-
* @return string The full package name (vendor/package), or empty string if not set.
88+
* @return string the full package name (vendor/package), or empty string if not set
8989
*/
9090
public function getPackageName(): string
9191
{
@@ -125,7 +125,7 @@ public function getAuthors(): array
125125
* The package name is expected in vendor/package format.
126126
* Returns null if no package name is set or if the package has no vendor prefix.
127127
*
128-
* @return string|null The vendor name, or null if package has no vendor prefix.
128+
* @return string|null the vendor name, or null if package has no vendor prefix
129129
*/
130130
public function getVendor(): ?string
131131
{
@@ -147,7 +147,7 @@ public function getVendor(): ?string
147147
/**
148148
* Returns the current year for copyright notices.
149149
*
150-
* @return int The current year as an integer.
150+
* @return int the current year as an integer
151151
*/
152152
public function getYear(): int
153153
{
@@ -162,7 +162,7 @@ public function getYear(): int
162162
*
163163
* @param array<string> $license The license array to extract from
164164
*
165-
* @return string|null A single license string, or null if extraction is not possible.
165+
* @return string|null a single license string, or null if extraction is not possible
166166
*/
167167
private function extractLicense(array $license): ?string
168168
{

src/License/ReaderInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ interface ReaderInterface
2929
/**
3030
* Retrieves the license identifier from composer.json.
3131
*
32-
* @return string|null The license string, or null if not set or unsupported.
32+
* @return string|null the license string, or null if not set or unsupported
3333
*/
3434
public function getLicense(): ?string;
3535

3636
/**
3737
* Retrieves the package name from composer.json.
3838
*
39-
* @return string The full package name (vendor/package).
39+
* @return string the full package name (vendor/package)
4040
*/
4141
public function getPackageName(): string;
4242

@@ -50,14 +50,14 @@ public function getAuthors(): array;
5050
/**
5151
* Extracts the vendor name from the package name.
5252
*
53-
* @return string|null The vendor name, or null if package has no vendor prefix.
53+
* @return string|null the vendor name, or null if package has no vendor prefix
5454
*/
5555
public function getVendor(): ?string;
5656

5757
/**
5858
* Returns the current year for copyright notices.
5959
*
60-
* @return int The current year as an integer.
60+
* @return int the current year as an integer
6161
*/
6262
public function getYear(): int;
6363
}

0 commit comments

Comments
 (0)