Skip to content

Commit 8eed6f9

Browse files
author
Dominik Liebler
committed
Merge pull request DesignPatternsPHP#130 from nueckman/codestyle-1
codestyle - remove trailing whitespaces
2 parents 6b910fa + 2bc3d20 commit 8eed6f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+40
-65
lines changed

Behavioral/Command/HelloCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* This concrete command calls "print" on the Receiver, but an external
7-
* invoker just know he can call "execute"
7+
* invoker just know he can call "execute"
88
*/
99
class HelloCommand implements CommandInterface
1010
{

Behavioral/NullObject/LoggerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* LoggerInterface is a contract for logging something
7-
*
7+
*
88
* Key feature: NullLogger MUST inherit from this interface like any other Loggers
99
*/
1010
interface LoggerInterface

Behavioral/NullObject/NullLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Performance concerns : ok there is a call for nothing but we spare an "if is_null"
77
* I didn't run a benchmark but I think it's equivalent.
8-
*
8+
*
99
* Key feature : of course this logger MUST implement the same interface (or abstract)
1010
* like the other loggers.
1111
*/

Behavioral/Observer/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Observer pattern : The observed object (the subject)
7-
*
7+
*
88
* The subject maintains a list of Observers and sends notifications.
99
*
1010
*/

Behavioral/Observer/UserObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class UserObserver implements \SplObserver
1010
/**
1111
* This is the only method to implement as an observer.
1212
* It is called by the Subject (usually by SplSubject::notify() )
13-
*
13+
*
1414
* @param \SplSubject $subject
1515
*/
1616
public function update(\SplSubject $subject)

Behavioral/Specification/Either.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Either extends AbstractSpecification
1212

1313
/**
1414
* A composite wrapper of two specifications
15-
*
15+
*
1616
* @param SpecificationInterface $left
1717
* @param SpecificationInterface $right
1818
*/
@@ -24,9 +24,9 @@ public function __construct(SpecificationInterface $left, SpecificationInterface
2424

2525
/**
2626
* Returns the evaluation of both wrapped specifications as a logical OR
27-
*
27+
*
2828
* @param Item $item
29-
*
29+
*
3030
* @return bool
3131
*/
3232
public function isSatisfiedBy(Item $item)

Behavioral/Specification/Item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Item
1010

1111
/**
1212
* An item must have a price
13-
*
13+
*
1414
* @param int $price
1515
*/
1616
public function __construct($price)
@@ -20,7 +20,7 @@ public function __construct($price)
2020

2121
/**
2222
* Get the items price
23-
*
23+
*
2424
* @return int
2525
*/
2626
public function getPrice()

Behavioral/Specification/Not.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Not extends AbstractSpecification
1111

1212
/**
1313
* Creates a new specification wrapping another
14-
*
14+
*
1515
* @param SpecificationInterface $spec
1616
*/
1717
public function __construct(SpecificationInterface $spec)
@@ -21,9 +21,9 @@ public function __construct(SpecificationInterface $spec)
2121

2222
/**
2323
* Returns the negated result of the wrapped specification
24-
*
24+
*
2525
* @param Item $item
26-
*
26+
*
2727
* @return bool
2828
*/
2929
public function isSatisfiedBy(Item $item)

Behavioral/TemplateMethod/Journey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ abstract class Journey
1010
/**
1111
* This is the public service provided by this class and its subclasses.
1212
* Notice it is final to "freeze" the global behavior of algorithm.
13-
* If you want to override this contract, make an interface with only takeATrip()
13+
* If you want to override this contract, make an interface with only takeATrip()
1414
* and subclass it.
1515
*/
1616
final public function takeATrip()

Behavioral/Visitor/RoleVisitorInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66
* Visitor Pattern
77
*
88
* The contract for the visitor.
9-
*
9+
*
1010
* Note 1 : in C++ or java, with method polymorphism based on type-hint, there are many
1111
* methods visit() with different type for the 'role' parameter.
12-
*
12+
*
1313
* Note 2 : the visitor must not choose itself which method to
1414
* invoke, it is the Visitee that make this decision.
1515
*/
1616
interface RoleVisitorInterface
1717
{
1818
/**
1919
* Visit a User object
20-
*
20+
*
2121
* @param \DesignPatterns\Behavioral\Visitor\User $role
2222
*/
2323
public function visitUser(User $role);
2424

2525
/**
2626
* Visit a Group object
27-
*
27+
*
2828
* @param \DesignPatterns\Behavioral\Visitor\Group $role
2929
*/
3030
public function visitGroup(Group $role);

0 commit comments

Comments
 (0)