mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 06:57:25 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -3,29 +3,29 @@
|
||||
namespace DesignPatterns\Structural\Facade;
|
||||
|
||||
/**
|
||||
* Class BiosInterface
|
||||
* Class BiosInterface.
|
||||
*/
|
||||
interface BiosInterface
|
||||
{
|
||||
/**
|
||||
* execute the BIOS
|
||||
* execute the BIOS.
|
||||
*/
|
||||
public function execute();
|
||||
|
||||
/**
|
||||
* wait for halt
|
||||
* wait for halt.
|
||||
*/
|
||||
public function waitForKeyPress();
|
||||
|
||||
/**
|
||||
* launches the OS
|
||||
* launches the OS.
|
||||
*
|
||||
* @param OsInterface $os
|
||||
*/
|
||||
public function launch(OsInterface $os);
|
||||
|
||||
/**
|
||||
* power down BIOS
|
||||
* power down BIOS.
|
||||
*/
|
||||
public function powerDown();
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
namespace DesignPatterns\Structural\Facade;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
class Facade
|
||||
@@ -20,7 +19,7 @@ class Facade
|
||||
|
||||
/**
|
||||
* This is the perfect time to use a dependency injection container
|
||||
* to create an instance of this class
|
||||
* to create an instance of this class.
|
||||
*
|
||||
* @param BiosInterface $bios
|
||||
* @param OsInterface $os
|
||||
@@ -32,7 +31,7 @@ class Facade
|
||||
}
|
||||
|
||||
/**
|
||||
* turn on the system
|
||||
* turn on the system.
|
||||
*/
|
||||
public function turnOn()
|
||||
{
|
||||
@@ -42,7 +41,7 @@ class Facade
|
||||
}
|
||||
|
||||
/**
|
||||
* turn off the system
|
||||
* turn off the system.
|
||||
*/
|
||||
public function turnOff()
|
||||
{
|
||||
|
@@ -3,12 +3,12 @@
|
||||
namespace DesignPatterns\Structural\Facade;
|
||||
|
||||
/**
|
||||
* Class OsInterface
|
||||
* Class OsInterface.
|
||||
*/
|
||||
interface OsInterface
|
||||
{
|
||||
/**
|
||||
* halt the OS
|
||||
* halt the OS.
|
||||
*/
|
||||
public function halt();
|
||||
}
|
||||
|
@@ -6,11 +6,10 @@ use DesignPatterns\Structural\Facade\Facade as Computer;
|
||||
use DesignPatterns\Structural\Facade\OsInterface;
|
||||
|
||||
/**
|
||||
* FacadeTest shows example of facades
|
||||
* FacadeTest shows example of facades.
|
||||
*/
|
||||
class FacadeTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function getComputer()
|
||||
{
|
||||
$bios = $this->getMockBuilder('DesignPatterns\Structural\Facade\BiosInterface')
|
||||
@@ -30,6 +29,7 @@ class FacadeTest extends \PHPUnit_Framework_TestCase
|
||||
->will($this->returnValue('Linux'));
|
||||
|
||||
$facade = new Computer($bios, $operatingSys);
|
||||
|
||||
return array(array($facade, $operatingSys));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user