update deps & install rector

This commit is contained in:
Dominik Liebler
2019-12-14 12:50:05 +01:00
parent 04acce6759
commit 579a5ac946
87 changed files with 2432 additions and 786 deletions

View File

@@ -8,14 +8,8 @@ namespace DesignPatterns\Structural\Adapter;
*/
class EBookAdapter implements Book
{
/**
* @var EBook
*/
protected $eBook;
protected EBook $eBook;
/**
* @param EBook $eBook
*/
public function __construct(EBook $eBook)
{
$this->eBook = $eBook;
@@ -37,8 +31,6 @@ class EBookAdapter implements Book
/**
* notice the adapted behavior here: EBook::getPage() will return two integers, but Book
* supports only a current page getter, so we adapt the behavior here
*
* @return int
*/
public function getPage(): int
{

View File

@@ -8,15 +8,8 @@ namespace DesignPatterns\Structural\Adapter;
*/
class Kindle implements EBook
{
/**
* @var int
*/
private $page = 1;
/**
* @var int
*/
private $totalPages = 100;
private int $page = 1;
private int $totalPages = 100;
public function pressNext()
{

View File

@@ -4,10 +4,7 @@ namespace DesignPatterns\Structural\Adapter;
class PaperBook implements Book
{
/**
* @var int
*/
private $page;
private int $page;
public function open()
{