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;
interface BiosInterface
interface Bios
{
public function execute();
public function waitForKeyPress();
public function launch(OsInterface $os);
public function launch(OperatingSystem $os);
public function powerDown();
}

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 39 KiB