remove Interface-Suffix

This commit is contained in:
Dominik Liebler
2019-08-19 16:59:16 +02:00
parent 26b1f209e2
commit d102f7d173
6 changed files with 16 additions and 16 deletions

View File

@@ -3,13 +3,13 @@ declare(strict_types=1);
namespace DesignPatterns\Structural\Facade; namespace DesignPatterns\Structural\Facade;
interface BiosInterface interface Bios
{ {
public function execute(); public function execute();
public function waitForKeyPress(); public function waitForKeyPress();
public function launch(OsInterface $os); public function launch(OperatingSystem $os);
public function powerDown(); public function powerDown();
} }

View File

@@ -6,20 +6,20 @@ namespace DesignPatterns\Structural\Facade;
class Facade class Facade
{ {
/** /**
* @var OsInterface * @var OperatingSystem
*/ */
private $os; private $os;
/** /**
* @var BiosInterface * @var Bios
*/ */
private $bios; private $bios;
/** /**
* @param BiosInterface $bios * @param Bios $bios
* @param OsInterface $os * @param OperatingSystem $os
*/ */
public function __construct(BiosInterface $bios, OsInterface $os) public function __construct(Bios $bios, OperatingSystem $os)
{ {
$this->bios = $bios; $this->bios = $bios;
$this->os = $os; $this->os = $os;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace DesignPatterns\Structural\Facade; namespace DesignPatterns\Structural\Facade;
interface OsInterface interface OperatingSystem
{ {
public function halt(); public function halt();

View File

@@ -41,15 +41,15 @@ Facade.php
:language: php :language: php
:linenos: :linenos:
OsInterface.php OperatingSystem.php
.. literalinclude:: OsInterface.php .. literalinclude:: OperatingSystem.php
:language: php :language: php
:linenos: :linenos:
BiosInterface.php Bios.php
.. literalinclude:: BiosInterface.php .. literalinclude:: Bios.php
:language: php :language: php
:linenos: :linenos:

View File

@@ -4,20 +4,20 @@ declare(strict_types=1);
namespace DesignPatterns\Structural\Facade\Tests; namespace DesignPatterns\Structural\Facade\Tests;
use DesignPatterns\Structural\Facade\Facade; use DesignPatterns\Structural\Facade\Facade;
use DesignPatterns\Structural\Facade\OsInterface; use DesignPatterns\Structural\Facade\OperatingSystem;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
class FacadeTest extends TestCase class FacadeTest extends TestCase
{ {
public function testComputerOn() public function testComputerOn()
{ {
/** @var OsInterface|\PHPUnit_Framework_MockObject_MockObject $os */ /** @var OperatingSystem|\PHPUnit_Framework_MockObject_MockObject $os */
$os = $this->createMock('DesignPatterns\Structural\Facade\OsInterface'); $os = $this->createMock('DesignPatterns\Structural\Facade\OperatingSystem');
$os->method('getName') $os->method('getName')
->will($this->returnValue('Linux')); ->will($this->returnValue('Linux'));
$bios = $this->getMockBuilder('DesignPatterns\Structural\Facade\BiosInterface') $bios = $this->getMockBuilder('DesignPatterns\Structural\Facade\Bios')
->setMethods(['launch', 'execute', 'waitForKeyPress']) ->setMethods(['launch', 'execute', 'waitForKeyPress'])
->disableAutoload() ->disableAutoload()
->getMock(); ->getMock();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 39 KiB