mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
cs
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\SimpleFactory;
|
||||
|
||||
/**
|
||||
@@ -11,10 +7,13 @@ namespace DesignPatterns\SimpleFactory;
|
||||
*/
|
||||
class Bicycle implements VehicleInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param mixed $destination
|
||||
*
|
||||
* @return mixed|void
|
||||
*/
|
||||
public function driveTo($destination)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\SimpleFactory;
|
||||
|
||||
/**
|
||||
@@ -17,7 +13,9 @@ namespace DesignPatterns\SimpleFactory;
|
||||
*/
|
||||
class ConcreteFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $typeList;
|
||||
|
||||
/**
|
||||
@@ -36,6 +34,7 @@ class ConcreteFactory
|
||||
* Creates a vehicle
|
||||
*
|
||||
* @param string $type a known type key
|
||||
*
|
||||
* @return VehicleInterface a new instance of VehicleInterface
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
@@ -48,5 +47,4 @@ class ConcreteFactory
|
||||
|
||||
return new $className();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user