Skip to content

Commit d102f7d

Browse files
author
Dominik Liebler
committed
remove Interface-Suffix
1 parent 26b1f20 commit d102f7d

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Structural/Facade/BiosInterface.php renamed to Structural/Facade/Bios.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
namespace DesignPatterns\Structural\Facade;
55

6-
interface BiosInterface
6+
interface Bios
77
{
88
public function execute();
99

1010
public function waitForKeyPress();
1111

12-
public function launch(OsInterface $os);
12+
public function launch(OperatingSystem $os);
1313

1414
public function powerDown();
1515
}

Structural/Facade/Facade.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
class Facade
77
{
88
/**
9-
* @var OsInterface
9+
* @var OperatingSystem
1010
*/
1111
private $os;
1212

1313
/**
14-
* @var BiosInterface
14+
* @var Bios
1515
*/
1616
private $bios;
1717

1818
/**
19-
* @param BiosInterface $bios
20-
* @param OsInterface $os
19+
* @param Bios $bios
20+
* @param OperatingSystem $os
2121
*/
22-
public function __construct(BiosInterface $bios, OsInterface $os)
22+
public function __construct(Bios $bios, OperatingSystem $os)
2323
{
2424
$this->bios = $bios;
2525
$this->os = $os;

Structural/Facade/OsInterface.php renamed to Structural/Facade/OperatingSystem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace DesignPatterns\Structural\Facade;
55

6-
interface OsInterface
6+
interface OperatingSystem
77
{
88
public function halt();
99

Structural/Facade/README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ Facade.php
4141
:language: php
4242
:linenos:
4343

44-
OsInterface.php
44+
OperatingSystem.php
4545

46-
.. literalinclude:: OsInterface.php
46+
.. literalinclude:: OperatingSystem.php
4747
:language: php
4848
:linenos:
4949

50-
BiosInterface.php
50+
Bios.php
5151

52-
.. literalinclude:: BiosInterface.php
52+
.. literalinclude:: Bios.php
5353
:language: php
5454
:linenos:
5555

Structural/Facade/Tests/FacadeTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
namespace DesignPatterns\Structural\Facade\Tests;
55

66
use DesignPatterns\Structural\Facade\Facade;
7-
use DesignPatterns\Structural\Facade\OsInterface;
7+
use DesignPatterns\Structural\Facade\OperatingSystem;
88
use PHPUnit\Framework\TestCase;
99

1010
class FacadeTest extends TestCase
1111
{
1212
public function testComputerOn()
1313
{
14-
/** @var OsInterface|\PHPUnit_Framework_MockObject_MockObject $os */
15-
$os = $this->createMock('DesignPatterns\Structural\Facade\OsInterface');
14+
/** @var OperatingSystem|\PHPUnit_Framework_MockObject_MockObject $os */
15+
$os = $this->createMock('DesignPatterns\Structural\Facade\OperatingSystem');
1616

1717
$os->method('getName')
1818
->will($this->returnValue('Linux'));
1919

20-
$bios = $this->getMockBuilder('DesignPatterns\Structural\Facade\BiosInterface')
20+
$bios = $this->getMockBuilder('DesignPatterns\Structural\Facade\Bios')
2121
->setMethods(['launch', 'execute', 'waitForKeyPress'])
2222
->disableAutoload()
2323
->getMock();

Structural/Facade/uml/uml.png

1.88 KB
Loading

0 commit comments

Comments
 (0)