mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 04:00:18 +02:00
Applied fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3663603b80
commit
fe1f144ec3
@@ -4,9 +4,8 @@ namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
class Assemble implements Workshop
|
||||
{
|
||||
|
||||
public function work()
|
||||
{
|
||||
print 'Assembled';
|
||||
echo 'Assembled';
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,10 @@
|
||||
namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
/**
|
||||
* Refined Abstraction
|
||||
* Refined Abstraction.
|
||||
*/
|
||||
class Car extends Vehicle
|
||||
{
|
||||
|
||||
public function __construct(Workshop $workShop1, Workshop $workShop2)
|
||||
{
|
||||
parent::__construct($workShop1, $workShop2);
|
||||
@@ -15,7 +14,7 @@ class Car extends Vehicle
|
||||
|
||||
public function manufacture()
|
||||
{
|
||||
print 'Car ';
|
||||
echo 'Car ';
|
||||
$this->workShop1->work();
|
||||
$this->workShop2->work();
|
||||
}
|
||||
|
@@ -3,11 +3,10 @@
|
||||
namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
/**
|
||||
* Refined Abstraction
|
||||
* Refined Abstraction.
|
||||
*/
|
||||
class Motorcycle extends Vehicle
|
||||
{
|
||||
|
||||
public function __construct(Workshop $workShop1, Workshop $workShop2)
|
||||
{
|
||||
parent::__construct($workShop1, $workShop2);
|
||||
@@ -15,7 +14,7 @@ class Motorcycle extends Vehicle
|
||||
|
||||
public function manufacture()
|
||||
{
|
||||
print 'Motorcycle ';
|
||||
echo 'Motorcycle ';
|
||||
$this->workShop1->work();
|
||||
$this->workShop2->work();
|
||||
}
|
||||
|
@@ -3,13 +3,12 @@
|
||||
namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
/**
|
||||
* Concrete Implementation
|
||||
* Concrete Implementation.
|
||||
*/
|
||||
class Produce implements Workshop
|
||||
{
|
||||
|
||||
public function work()
|
||||
{
|
||||
print 'Produced ';
|
||||
echo 'Produced ';
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,6 @@ use DesignPatterns\Structural\Bridge\Produce;
|
||||
|
||||
class BridgeTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testCar()
|
||||
{
|
||||
$vehicle = new Car(new Produce(), new Assemble());
|
||||
|
@@ -3,11 +3,10 @@
|
||||
namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
/**
|
||||
* Abstraction
|
||||
* Abstraction.
|
||||
*/
|
||||
abstract class Vehicle
|
||||
{
|
||||
|
||||
protected $workShop1;
|
||||
protected $workShop2;
|
||||
|
||||
|
@@ -3,10 +3,9 @@
|
||||
namespace DesignPatterns\Structural\Bridge;
|
||||
|
||||
/**
|
||||
* Implementer
|
||||
* Implementer.
|
||||
*/
|
||||
interface Workshop
|
||||
{
|
||||
|
||||
public function work();
|
||||
}
|
||||
|
Reference in New Issue
Block a user