Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Rename parameter and field #26

Merged
merged 1 commit into from Jan 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/License/Header.php
Expand Up @@ -18,26 +18,26 @@
*/
final class Header
{
private $copyrightYear;
private $copyrightYears;

private $author;

private $notice;

private $url;

private function __construct(CopyrightYears $copyrightYear, Author $author, Notice $notice, Url $url)
private function __construct(CopyrightYears $copyrightYears, Author $author, Notice $notice, Url $url)
{
$this->copyrightYear = $copyrightYear;
$this->copyrightYears = $copyrightYears;
$this->author = $author;
$this->notice = $notice;
$this->url = $url;
}

public static function create(CopyrightYears $copyrightYear, Author $author, Notice $notice, Url $url): self
public static function create(CopyrightYears $copyrightYears, Author $author, Notice $notice, Url $url): self
{
return new self(
$copyrightYear,
$copyrightYears,
$author,
$notice,
$url
Expand All @@ -48,14 +48,14 @@ public function toString(): string
{
if ($this->notice->isEmpty()) {
return <<<EOF
Copyright (c) {$this->copyrightYear->toString()} {$this->author->toString()}
Copyright (c) {$this->copyrightYears->toString()} {$this->author->toString()}

@see {$this->url->toString()}
EOF;
}

return <<<EOF
Copyright (c) {$this->copyrightYear->toString()} {$this->author->toString()}
Copyright (c) {$this->copyrightYears->toString()} {$this->author->toString()}

{$this->notice->toString()}

Expand Down