Applied fixes from StyleCI

This commit is contained in:
Dominik Liebler
2015-12-21 07:28:20 -05:00
committed by StyleCI Bot
parent 3663603b80
commit fe1f144ec3
167 changed files with 510 additions and 517 deletions

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* Bicycle is a bicycle
* Bicycle is a bicycle.
*/
class Bicycle implements VehicleInterface
{
@@ -13,7 +13,7 @@ class Bicycle implements VehicleInterface
protected $color;
/**
* sets the color of the bicycle
* sets the color of the bicycle.
*
* @param string $rgb
*/

View File

@@ -3,16 +3,15 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* class FactoryMethod
* class FactoryMethod.
*/
abstract class FactoryMethod
{
const CHEAP = 1;
const FAST = 2;
/**
* The children of the class must implement this method
* The children of the class must implement this method.
*
* Sometimes this method can be public to get "raw" object
*
@@ -23,7 +22,7 @@ abstract class FactoryMethod
abstract protected function createVehicle($type);
/**
* Creates a new vehicle
* Creates a new vehicle.
*
* @param int $type
*
@@ -32,7 +31,7 @@ abstract class FactoryMethod
public function create($type)
{
$obj = $this->createVehicle($type);
$obj->setColor("#f00");
$obj->setColor('#f00');
return $obj;
}

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* Ferrari is a italian car
* Ferrari is a italian car.
*/
class Ferrari implements VehicleInterface
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* GermanFactory is a vehicle factory in Germany
* GermanFactory is a vehicle factory in Germany.
*/
class GermanFactory extends FactoryMethod
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* ItalianFactory is vehicle factory in Italy
* ItalianFactory is vehicle factory in Italy.
*/
class ItalianFactory extends FactoryMethod
{

View File

@@ -3,7 +3,7 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* Porsche is a german car
* Porsche is a german car.
*/
class Porsche implements VehicleInterface
{

View File

@@ -7,21 +7,20 @@ use DesignPatterns\Creational\FactoryMethod\GermanFactory;
use DesignPatterns\Creational\FactoryMethod\ItalianFactory;
/**
* FactoryMethodTest tests the factory method pattern
* FactoryMethodTest tests the factory method pattern.
*/
class FactoryMethodTest extends \PHPUnit_Framework_TestCase
{
protected $type = array(
FactoryMethod::CHEAP,
FactoryMethod::FAST
FactoryMethod::FAST,
);
public function getShop()
{
return array(
array(new GermanFactory()),
array(new ItalianFactory())
array(new ItalianFactory()),
);
}

View File

@@ -3,12 +3,12 @@
namespace DesignPatterns\Creational\FactoryMethod;
/**
* VehicleInterface is a contract for a vehicle
* VehicleInterface is a contract for a vehicle.
*/
interface VehicleInterface
{
/**
* sets the color of the vehicle
* sets the color of the vehicle.
*
* @param string $rgb
*/