mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-04 14:07:25 +02:00
cs
This commit is contained in:
@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
|
||||
/**
|
||||
* Bicycle is a bicycle
|
||||
*/
|
||||
class Bicycle implements Vehicle
|
||||
class Bicycle implements VehicleInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
|
||||
/**
|
||||
* Ferrari is a italian car
|
||||
*/
|
||||
class Ferrari implements Vehicle
|
||||
class Ferrari implements VehicleInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
|
@@ -5,7 +5,7 @@ namespace DesignPatterns\FactoryMethod;
|
||||
/**
|
||||
* Porsche is a german car
|
||||
*/
|
||||
class Porsche implements Vehicle
|
||||
class Porsche implements VehicleInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
|
@@ -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);
|
||||
}
|
Reference in New Issue
Block a user