diff --git a/Behavioral/Command/HelloCommand.php b/Behavioral/Command/HelloCommand.php index 3dd55b1..eb630ed 100644 --- a/Behavioral/Command/HelloCommand.php +++ b/Behavioral/Command/HelloCommand.php @@ -4,7 +4,7 @@ namespace DesignPatterns\Behavioral\Command; /** * This concrete command calls "print" on the Receiver, but an external - * invoker just know he can call "execute" + * invoker just know he can call "execute" */ class HelloCommand implements CommandInterface { diff --git a/Behavioral/NullObject/LoggerInterface.php b/Behavioral/NullObject/LoggerInterface.php index 250c5a3..216d838 100644 --- a/Behavioral/NullObject/LoggerInterface.php +++ b/Behavioral/NullObject/LoggerInterface.php @@ -4,7 +4,7 @@ namespace DesignPatterns\Behavioral\NullObject; /** * LoggerInterface is a contract for logging something - * + * * Key feature: NullLogger MUST inherit from this interface like any other Loggers */ interface LoggerInterface diff --git a/Behavioral/NullObject/NullLogger.php b/Behavioral/NullObject/NullLogger.php index 49ff51e..a4bf469 100644 --- a/Behavioral/NullObject/NullLogger.php +++ b/Behavioral/NullObject/NullLogger.php @@ -5,7 +5,7 @@ namespace DesignPatterns\Behavioral\NullObject; /** * Performance concerns : ok there is a call for nothing but we spare an "if is_null" * I didn't run a benchmark but I think it's equivalent. - * + * * Key feature : of course this logger MUST implement the same interface (or abstract) * like the other loggers. */ diff --git a/Behavioral/Observer/User.php b/Behavioral/Observer/User.php index b7ffd19..013f194 100644 --- a/Behavioral/Observer/User.php +++ b/Behavioral/Observer/User.php @@ -4,7 +4,7 @@ namespace DesignPatterns\Behavioral\Observer; /** * Observer pattern : The observed object (the subject) - * + * * The subject maintains a list of Observers and sends notifications. * */ diff --git a/Behavioral/Observer/UserObserver.php b/Behavioral/Observer/UserObserver.php index 444a0eb..f444604 100644 --- a/Behavioral/Observer/UserObserver.php +++ b/Behavioral/Observer/UserObserver.php @@ -10,7 +10,7 @@ class UserObserver implements \SplObserver /** * This is the only method to implement as an observer. * It is called by the Subject (usually by SplSubject::notify() ) - * + * * @param \SplSubject $subject */ public function update(\SplSubject $subject) diff --git a/Behavioral/Specification/Either.php b/Behavioral/Specification/Either.php index 3479460..bb7ef01 100644 --- a/Behavioral/Specification/Either.php +++ b/Behavioral/Specification/Either.php @@ -12,7 +12,7 @@ class Either extends AbstractSpecification /** * A composite wrapper of two specifications - * + * * @param SpecificationInterface $left * @param SpecificationInterface $right */ @@ -24,9 +24,9 @@ class Either extends AbstractSpecification /** * Returns the evaluation of both wrapped specifications as a logical OR - * + * * @param Item $item - * + * * @return bool */ public function isSatisfiedBy(Item $item) diff --git a/Behavioral/Specification/Item.php b/Behavioral/Specification/Item.php index 5889587..ff24a50 100644 --- a/Behavioral/Specification/Item.php +++ b/Behavioral/Specification/Item.php @@ -10,7 +10,7 @@ class Item /** * An item must have a price - * + * * @param int $price */ public function __construct($price) @@ -20,7 +20,7 @@ class Item /** * Get the items price - * + * * @return int */ public function getPrice() diff --git a/Behavioral/Specification/Not.php b/Behavioral/Specification/Not.php index 64b5c10..6cf578c 100644 --- a/Behavioral/Specification/Not.php +++ b/Behavioral/Specification/Not.php @@ -11,7 +11,7 @@ class Not extends AbstractSpecification /** * Creates a new specification wrapping another - * + * * @param SpecificationInterface $spec */ public function __construct(SpecificationInterface $spec) @@ -21,9 +21,9 @@ class Not extends AbstractSpecification /** * Returns the negated result of the wrapped specification - * + * * @param Item $item - * + * * @return bool */ public function isSatisfiedBy(Item $item) diff --git a/Behavioral/TemplateMethod/Journey.php b/Behavioral/TemplateMethod/Journey.php index fbf79d4..cec9a7d 100644 --- a/Behavioral/TemplateMethod/Journey.php +++ b/Behavioral/TemplateMethod/Journey.php @@ -10,7 +10,7 @@ abstract class Journey /** * This is the public service provided by this class and its subclasses. * Notice it is final to "freeze" the global behavior of algorithm. - * If you want to override this contract, make an interface with only takeATrip() + * If you want to override this contract, make an interface with only takeATrip() * and subclass it. */ final public function takeATrip() diff --git a/Behavioral/Visitor/RoleVisitorInterface.php b/Behavioral/Visitor/RoleVisitorInterface.php index 3c9e24a..b007b13 100644 --- a/Behavioral/Visitor/RoleVisitorInterface.php +++ b/Behavioral/Visitor/RoleVisitorInterface.php @@ -6,10 +6,10 @@ namespace DesignPatterns\Behavioral\Visitor; * Visitor Pattern * * The contract for the visitor. - * + * * Note 1 : in C++ or java, with method polymorphism based on type-hint, there are many * methods visit() with different type for the 'role' parameter. - * + * * Note 2 : the visitor must not choose itself which method to * invoke, it is the Visitee that make this decision. */ @@ -17,14 +17,14 @@ interface RoleVisitorInterface { /** * Visit a User object - * + * * @param \DesignPatterns\Behavioral\Visitor\User $role */ public function visitUser(User $role); /** * Visit a Group object - * + * * @param \DesignPatterns\Behavioral\Visitor\Group $role */ public function visitGroup(Group $role); diff --git a/Creational/AbstractFactory/AbstractFactory.php b/Creational/AbstractFactory/AbstractFactory.php index 84b4203..49982e5 100644 --- a/Creational/AbstractFactory/AbstractFactory.php +++ b/Creational/AbstractFactory/AbstractFactory.php @@ -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 * diff --git a/Creational/AbstractFactory/Tests/AbstractFactoryTest.php b/Creational/AbstractFactory/Tests/AbstractFactoryTest.php index 9c61f96..b51394a 100644 --- a/Creational/AbstractFactory/Tests/AbstractFactoryTest.php +++ b/Creational/AbstractFactory/Tests/AbstractFactoryTest.php @@ -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) diff --git a/Creational/Builder/BikeBuilder.php b/Creational/Builder/BikeBuilder.php index 477e1ad..53d53d3 100644 --- a/Creational/Builder/BikeBuilder.php +++ b/Creational/Builder/BikeBuilder.php @@ -17,7 +17,6 @@ class BikeBuilder implements BuilderInterface */ public function addDoors() { - } /** diff --git a/Creational/Builder/Director.php b/Creational/Builder/Director.php index 0c11877..d7f3aa3 100644 --- a/Creational/Builder/Director.php +++ b/Creational/Builder/Director.php @@ -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 diff --git a/Creational/Builder/Parts/Bike.php b/Creational/Builder/Parts/Bike.php index 307b3e0..6efefe9 100644 --- a/Creational/Builder/Parts/Bike.php +++ b/Creational/Builder/Parts/Bike.php @@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts; */ class Bike extends Vehicle { - } diff --git a/Creational/Builder/Parts/Car.php b/Creational/Builder/Parts/Car.php index a18b301..1d4496c 100644 --- a/Creational/Builder/Parts/Car.php +++ b/Creational/Builder/Parts/Car.php @@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts; */ class Car extends Vehicle { - } diff --git a/Creational/Builder/Parts/Door.php b/Creational/Builder/Parts/Door.php index aa08772..526d41b 100644 --- a/Creational/Builder/Parts/Door.php +++ b/Creational/Builder/Parts/Door.php @@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts; */ class Door { - } diff --git a/Creational/Builder/Parts/Engine.php b/Creational/Builder/Parts/Engine.php index 08d5bd0..0b2fad0 100644 --- a/Creational/Builder/Parts/Engine.php +++ b/Creational/Builder/Parts/Engine.php @@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts; */ class Engine { - } diff --git a/Creational/Builder/Parts/Wheel.php b/Creational/Builder/Parts/Wheel.php index 19ef7c3..7fb60fd 100644 --- a/Creational/Builder/Parts/Wheel.php +++ b/Creational/Builder/Parts/Wheel.php @@ -7,5 +7,4 @@ namespace DesignPatterns\Creational\Builder\Parts; */ class Wheel { - } diff --git a/Creational/Builder/Tests/DirectorTest.php b/Creational/Builder/Tests/DirectorTest.php index 33e853e..0520bfe 100644 --- a/Creational/Builder/Tests/DirectorTest.php +++ b/Creational/Builder/Tests/DirectorTest.php @@ -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) diff --git a/Creational/FactoryMethod/FactoryMethod.php b/Creational/FactoryMethod/FactoryMethod.php index e4f3771..dd24b15 100644 --- a/Creational/FactoryMethod/FactoryMethod.php +++ b/Creational/FactoryMethod/FactoryMethod.php @@ -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) diff --git a/Creational/FactoryMethod/Porsche.php b/Creational/FactoryMethod/Porsche.php index 818a082..cba25ce 100644 --- a/Creational/FactoryMethod/Porsche.php +++ b/Creational/FactoryMethod/Porsche.php @@ -26,6 +26,5 @@ class Porsche implements VehicleInterface */ public function addTuningAMG() { - } } diff --git a/Creational/Multiton/Multiton.php b/Creational/Multiton/Multiton.php index e10c513..44f1ef0 100644 --- a/Creational/Multiton/Multiton.php +++ b/Creational/Multiton/Multiton.php @@ -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() { - } } diff --git a/Creational/Pool/Tests/TestWorker.php b/Creational/Pool/Tests/TestWorker.php index 7c2c2db..3cfbef5 100644 --- a/Creational/Pool/Tests/TestWorker.php +++ b/Creational/Pool/Tests/TestWorker.php @@ -1,4 +1,4 @@ -