Files
Mario Simão 56970cc221 style: Adopt PSR12
Dev dependency flyeralarm/php-code-validator has been removed.

Closes #444
2021-10-01 10:26:04 -03:00

28 lines
475 B
PHP

<?php
declare(strict_types=1);
namespace DesignPatterns\Behavioral\Iterator;
class Book
{
public function __construct(private string $title, private string $author)
{
}
public function getAuthor(): string
{
return $this->author;
}
public function getTitle(): string
{
return $this->title;
}
public function getAuthorAndTitle(): string
{
return $this->getTitle() . ' by ' . $this->getAuthor();
}
}