This commit is contained in:
Dominik Liebler
2013-09-13 14:19:55 +02:00
parent 8452c63b7e
commit 8b82ed198d
47 changed files with 93 additions and 218 deletions

View File

@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
/**
* Bicycle is a bicycle
*/
class Bicycle implements Vehicle
class Bicycle implements VehicleInterface
{
/**
* @var string

View File

@@ -28,7 +28,7 @@ abstract class FactoryMethod
*
* @param string $type a generic type
*
* @return Vehicle a new vehicle
* @return VehicleInterface a new vehicle
*/
abstract protected function createVehicle($type);
@@ -37,7 +37,7 @@ abstract class FactoryMethod
*
* @param int $type
*
* @return Vehicle a new vehicle
* @return VehicleInterface a new vehicle
*/
public function create($type)
{

View File

@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
/**
* Ferrari is a italian car
*/
class Ferrari implements Vehicle
class Ferrari implements VehicleInterface
{
/**
* @var string

View File

@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
/**
* Porsche is a german car
*/
class Porsche implements Vehicle
class Porsche implements VehicleInterface
{
/**
* @var string

View File

@@ -3,14 +3,14 @@
namespace DesignPatterns\FactoryMethod;
/**
* Vehicle is a contract for a vehicle
* VehicleInterface is a contract for a vehicle
*/
interface Vehicle
interface VehicleInterface
{
/**
* sets the color of the vehicle
*
* @param string $rgb
*/
function setColor($rgb);
public function setColor($rgb);
}