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,16 +8,11 @@ namespace DesignPatterns\Behavioral\Command;
*/
class AddMessageDateCommand implements UndoableCommand
{
/**
* @var Receiver
*/
private $output;
private Receiver $output;
/**
* Each concrete command is built with different receivers.
* There can be one, many or completely no receivers, but there can be other commands in the parameters.
*
* @param Receiver $console
*/
public function __construct(Receiver $console)
{

View File

@@ -8,16 +8,11 @@ namespace DesignPatterns\Behavioral\Command;
*/
class HelloCommand implements Command
{
/**
* @var Receiver
*/
private $output;
private Receiver $output;
/**
* Each concrete command is built with different receivers.
* There can be one, many or completely no receivers, but there can be other commands in the parameters
*
* @param Receiver $console
*/
public function __construct(Receiver $console)
{

View File

@@ -8,16 +8,11 @@ namespace DesignPatterns\Behavioral\Command;
*/
class Invoker
{
/**
* @var Command
*/
private $command;
private Command $command;
/**
* in the invoker we find this kind of method for subscribing the command
* There can be also a stack, a list, a fixed set ...
*
* @param Command $cmd
*/
public function setCommand(Command $cmd)
{

View File

@@ -3,23 +3,17 @@
namespace DesignPatterns\Behavioral\Command;
/**
* Receiver is specific service with its own contract and can be only concrete.
* Receiver is a specific service with its own contract and can be only concrete.
*/
class Receiver
{
/**
* @var bool
*/
private $enableDate = false;
private bool $enableDate = false;
/**
* @var string[]
*/
private $output = [];
private array $output = [];
/**
* @param string $str
*/
public function write(string $str)
{
if ($this->enableDate) {