mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-11 01:14:01 +02:00
removed ...Interface suffix and added 2nd service to Bridge example
This commit is contained in:
@@ -5,25 +5,25 @@ namespace DesignPatterns\Structural\Bridge;
|
||||
abstract class Service
|
||||
{
|
||||
/**
|
||||
* @var FormatterInterface
|
||||
* @var Formatter
|
||||
*/
|
||||
protected $implementation;
|
||||
|
||||
/**
|
||||
* @param FormatterInterface $printer
|
||||
* @param Formatter $printer
|
||||
*/
|
||||
public function __construct(FormatterInterface $printer)
|
||||
public function __construct(Formatter $printer)
|
||||
{
|
||||
$this->implementation = $printer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FormatterInterface $printer
|
||||
* @param Formatter $printer
|
||||
*/
|
||||
public function setImplementation(FormatterInterface $printer)
|
||||
public function setImplementation(Formatter $printer)
|
||||
{
|
||||
$this->implementation = $printer;
|
||||
}
|
||||
|
||||
abstract public function get();
|
||||
abstract public function get(): string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user