Skip to content

Commit

Permalink
Fix: Rename named constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Oct 1, 2022
1 parent a1117f3 commit c8d19ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`1.2.0...main`][1.2.0...main].

## Changed

- Renamed `Header::create()` to `Header::createWithReferenceToLicenseFile()` ([#533]), by [@localheinz]

## [`1.2.0`][1.2.0]

For a full diff see [`1.1.0...1.2.0`][1.1.0...1.2.0].
Expand Down Expand Up @@ -77,5 +81,6 @@ For a full diff see [`675601b...0.1.0`][675601b...0.1.0].
[#177]: https://github.com/ergebnis/license/pull/177
[#416]: https://github.com/ergebnis/license/pull/416
[#422]: https://github.com/ergebnis/license/pull/422
[#533]: https://github.com/ergebnis/license/pull/533

[@localheinz]: https://github.com/localheinz
2 changes: 1 addition & 1 deletion src/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private function __construct(
$this->url = $url;
}

public static function create(
public static function createWithReferenceToLicenseFile(
Template $template,
Period $period,
Holder $holder,
Expand Down
2 changes: 1 addition & 1 deletion src/Type/MIT.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private function __construct(
$holder,
);

$header = Header::create(
$header = Header::createWithReferenceToLicenseFile(
$headerTemplate,
$period,
$holder,
Expand Down
4 changes: 2 additions & 2 deletions test/Unit/HeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ final class HeaderTest extends Framework\TestCase
{
use Test\Util\Helper;

public function testToStringReturnsStringRepresentation(): void
public function testCreateWithReferenceToLicenseFileReturnsHeader(): void
{
$faker = self::faker();

Expand All @@ -61,7 +61,7 @@ public function testToStringReturnsStringRepresentation(): void
);
$url = Url::fromString($faker->url);

$header = Header::create(
$header = Header::createWithReferenceToLicenseFile(
$template,
$range,
$holder,
Expand Down

0 comments on commit c8d19ac

Please sign in to comment.