mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-02 05:00:15 +02:00
Merge pull request #130 from nueckman/codestyle-1
codestyle - remove trailing whitespaces
This commit is contained in:
@@ -21,7 +21,7 @@ abstract class AbstractFactory
|
||||
{
|
||||
/**
|
||||
* Creates a text component
|
||||
*
|
||||
*
|
||||
* @param string $content
|
||||
*
|
||||
* @return Text
|
||||
@@ -30,7 +30,7 @@ abstract class AbstractFactory
|
||||
|
||||
/**
|
||||
* Creates a picture component
|
||||
*
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $name
|
||||
*
|
||||
|
@@ -21,9 +21,9 @@ class AbstractFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* This is the client of factories. Note that the client does not
|
||||
* care which factory is given to him, he can create any component he
|
||||
* care which factory is given to him, he can create any component he
|
||||
* wants and render how he wants.
|
||||
*
|
||||
*
|
||||
* @dataProvider getFactories
|
||||
*/
|
||||
public function testComponentCreation(AbstractFactory $factory)
|
||||
|
@@ -17,7 +17,6 @@ class BikeBuilder implements BuilderInterface
|
||||
*/
|
||||
public function addDoors()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -4,8 +4,8 @@ namespace DesignPatterns\Creational\Builder;
|
||||
|
||||
/**
|
||||
* Director is part of the builder pattern. It knows the interface of the builder
|
||||
* and builds a complex object with the help of the builder.
|
||||
*
|
||||
* and builds a complex object with the help of the builder.
|
||||
*
|
||||
* You can also inject many builders instead of one to build more complex objects
|
||||
*/
|
||||
class Director
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts;
|
||||
*/
|
||||
class Bike extends Vehicle
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts;
|
||||
*/
|
||||
class Car extends Vehicle
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts;
|
||||
*/
|
||||
class Door
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts;
|
||||
*/
|
||||
class Engine
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts;
|
||||
*/
|
||||
class Wheel
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ class DirectorTest extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Here we test the build process. Notice that the client don't know
|
||||
* anything about the concrete builder.
|
||||
*
|
||||
*
|
||||
* @dataProvider getBuilder
|
||||
*/
|
||||
public function testBuild(BuilderInterface $builder)
|
||||
|
@@ -13,20 +13,20 @@ abstract class FactoryMethod
|
||||
|
||||
/**
|
||||
* The children of the class must implement this method
|
||||
*
|
||||
*
|
||||
* Sometimes this method can be public to get "raw" object
|
||||
*
|
||||
*
|
||||
* @param string $type a generic type
|
||||
*
|
||||
*
|
||||
* @return VehicleInterface a new vehicle
|
||||
*/
|
||||
abstract protected function createVehicle($type);
|
||||
|
||||
/**
|
||||
* Creates a new vehicle
|
||||
*
|
||||
*
|
||||
* @param int $type
|
||||
*
|
||||
*
|
||||
* @return VehicleInterface a new vehicle
|
||||
*/
|
||||
public function create($type)
|
||||
|
@@ -26,6 +26,5 @@ class Porsche implements VehicleInterface
|
||||
*/
|
||||
public function addTuningAMG()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -32,13 +32,12 @@ class Multiton
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the instance with the given name, e.g. Multiton::INSTANCE_1
|
||||
* uses lazy initialization
|
||||
*
|
||||
*
|
||||
* @param string $instanceName
|
||||
*
|
||||
* @return Multiton
|
||||
@@ -59,7 +58,6 @@ class Multiton
|
||||
*/
|
||||
private function __clone()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,6 +67,5 @@ class Multiton
|
||||
*/
|
||||
private function __wakeup()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Creational\Pool\Tests;
|
||||
|
||||
|
@@ -17,6 +17,5 @@ class BarBookPrototype extends BookPrototype
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,5 @@ class FooBookPrototype extends BookPrototype
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,5 @@ class Bicycle implements VehicleInterface
|
||||
*/
|
||||
public function driveTo($destination)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ class ConcreteFactory
|
||||
|
||||
/**
|
||||
* Creates a vehicle
|
||||
*
|
||||
*
|
||||
* @param string $type a known type key
|
||||
*
|
||||
* @return VehicleInterface a new instance of VehicleInterface
|
||||
|
@@ -12,6 +12,5 @@ class Scooter implements VehicleInterface
|
||||
*/
|
||||
public function driveTo($destination)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ class Singleton
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
|
||||
if (null === static::$instance) {
|
||||
static::$instance = new static;
|
||||
}
|
||||
@@ -33,7 +32,6 @@ class Singleton
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +41,6 @@ class Singleton
|
||||
*/
|
||||
private function __clone()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,6 +50,5 @@ class Singleton
|
||||
*/
|
||||
private function __wakeup()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\StaticFactory;
|
||||
*/
|
||||
class FormatNumber implements FormatterInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\StaticFactory;
|
||||
*/
|
||||
class FormatString implements FormatterInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\StaticFactory;
|
||||
*/
|
||||
interface FormatterInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user