mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-27 02:00:20 +02:00
remove Interface-Suffix
This commit is contained in:
@@ -3,15 +3,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace DesignPatterns\Behavioral\Mediator;
|
namespace DesignPatterns\Behavioral\Mediator;
|
||||||
|
|
||||||
/**
|
|
||||||
* Colleague is an abstract colleague who works together but he only knows
|
|
||||||
* the Mediator, not other colleagues
|
|
||||||
*/
|
|
||||||
abstract class Colleague
|
abstract class Colleague
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* this ensures no change in subclasses.
|
|
||||||
*
|
|
||||||
* @var MediatorInterface
|
* @var MediatorInterface
|
||||||
*/
|
*/
|
||||||
protected $mediator;
|
protected $mediator;
|
||||||
|
@@ -3,11 +3,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace DesignPatterns\Behavioral\Mediator;
|
namespace DesignPatterns\Behavioral\Mediator;
|
||||||
|
|
||||||
/**
|
|
||||||
* Mediator is the concrete Mediator for this design pattern
|
|
||||||
*
|
|
||||||
* In this example, I have made a "Hello World" with the Mediator Pattern
|
|
||||||
*/
|
|
||||||
class Mediator implements MediatorInterface
|
class Mediator implements MediatorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -3,10 +3,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace DesignPatterns\Behavioral\Mediator;
|
namespace DesignPatterns\Behavioral\Mediator;
|
||||||
|
|
||||||
/**
|
|
||||||
* MediatorInterface is a contract for the Mediator
|
|
||||||
* This interface is not mandatory but it is better for Liskov substitution principle concerns.
|
|
||||||
*/
|
|
||||||
interface MediatorInterface
|
interface MediatorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user