Skip to content

Commit fe1f144

Browse files
Dominik LieblerStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent 3663603 commit fe1f144

File tree

167 files changed

+510
-517
lines changed

Some content is hidden

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

167 files changed

+510
-517
lines changed

Behavioral/ChainOfResponsibilities/Handler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace DesignPatterns\Behavioral\ChainOfResponsibilities;
44

55
/**
6-
* Handler is a generic handler in the chain of responsibilities
6+
* Handler is a generic handler in the chain of responsibilities.
77
*
88
* Yes you could have a lighter CoR with a simpler handler but if you want your CoR
99
* to be extendable and decoupled, it's a better idea to do things like that in real
@@ -18,7 +18,7 @@ abstract class Handler
1818
private $successor = null;
1919

2020
/**
21-
* Append a responsibility to the end of chain
21+
* Append a responsibility to the end of chain.
2222
*
2323
* A prepend method could be done with the same spirit
2424
*
@@ -68,7 +68,7 @@ final public function handle(Request $req)
6868
}
6969

7070
/**
71-
* Each concrete handler has to implement the processing of the request
71+
* Each concrete handler has to implement the processing of the request.
7272
*
7373
* @param Request $req
7474
*

Behavioral/ChainOfResponsibilities/Responsible/FastStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use DesignPatterns\Behavioral\ChainOfResponsibilities\Request;
77

88
/**
9-
* Class FastStorage
9+
* Class FastStorage.
1010
*/
1111
class FastStorage extends Handler
1212
{

Behavioral/ChainOfResponsibilities/Responsible/SlowStorage.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
use DesignPatterns\Behavioral\ChainOfResponsibilities\Request;
77

88
/**
9-
* This is mostly the same code as FastStorage but in fact, it may greatly differs
9+
* This is mostly the same code as FastStorage but in fact, it may greatly differs.
1010
*
1111
* One important fact about CoR: each item in the chain MUST NOT assume its position
1212
* in the chain. A CoR is not responsible if the request is not handled UNLESS
1313
* you make an "ExceptionHandler" which throws exception if the request goes there.
1414
*
1515
* To be really extendable, each handler doesn't know if there is something after it.
16-
*
1716
*/
1817
class SlowStorage extends Handler
1918
{

Behavioral/ChainOfResponsibilities/Tests/ChainTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
namespace DesignPatterns\Behavioral\ChainOfResponsibilities\Tests;
44

55
use DesignPatterns\Behavioral\ChainOfResponsibilities\Request;
6+
use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible;
67
use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible\FastStorage;
78
use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible\SlowStorage;
8-
use DesignPatterns\Behavioral\ChainOfResponsibilities\Responsible;
99

1010
/**
11-
* ChainTest tests the CoR
11+
* ChainTest tests the CoR.
1212
*/
1313
class ChainTest extends \PHPUnit_Framework_TestCase
1414
{
15-
1615
/**
1716
* @var FastStorage
1817
*/
@@ -30,7 +29,7 @@ public function makeRequest()
3029
$request->verb = 'get';
3130

3231
return array(
33-
array($request)
32+
array($request),
3433
);
3534
}
3635

Behavioral/Command/CommandInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace DesignPatterns\Behavioral\Command;
44

55
/**
6-
* class CommandInterface
6+
* class CommandInterface.
77
*/
88
interface CommandInterface
99
{

Behavioral/Command/HelloCommand.php

Lines changed: 2 additions & 2 deletions
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 knows that it can call "execute"
7+
* invoker just knows that it can call "execute".
88
*/
99
class HelloCommand implements CommandInterface
1010
{
@@ -25,7 +25,7 @@ public function __construct(Receiver $console)
2525
}
2626

2727
/**
28-
* execute and output "Hello World"
28+
* execute and output "Hello World".
2929
*/
3030
public function execute()
3131
{

Behavioral/Command/Invoker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Invoker is using the command given to it.
7-
* Example : an Application in SF2
7+
* Example : an Application in SF2.
88
*/
99
class Invoker
1010
{
@@ -25,7 +25,7 @@ public function setCommand(CommandInterface $cmd)
2525
}
2626

2727
/**
28-
* executes the command
28+
* executes the command.
2929
*/
3030
public function run()
3131
{

Behavioral/Command/Receiver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace DesignPatterns\Behavioral\Command;
44

55
/**
6-
* Receiver is specific service with its own contract and can be only concrete
6+
* Receiver is specific service with its own contract and can be only concrete.
77
*/
88
class Receiver
99
{

Behavioral/Command/Tests/CommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
namespace DesignPatterns\Behavioral\Command\Tests;
44

5+
use DesignPatterns\Behavioral\Command\HelloCommand;
56
use DesignPatterns\Behavioral\Command\Invoker;
67
use DesignPatterns\Behavioral\Command\Receiver;
7-
use DesignPatterns\Behavioral\Command\HelloCommand;
88

99
/**
10-
* CommandTest has the role of the Client in the Command Pattern
10+
* CommandTest has the role of the Client in the Command Pattern.
1111
*/
1212
class CommandTest extends \PHPUnit_Framework_TestCase
1313
{
14-
1514
/**
1615
* @var Invoker
1716
*/

Behavioral/Iterator/Book.php

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

55
class Book
66
{
7-
87
private $author;
98

109
private $title;
@@ -27,6 +26,6 @@ public function getTitle()
2726

2827
public function getAuthorAndTitle()
2928
{
30-
return $this->getTitle() . ' by ' . $this->getAuthor();
29+
return $this->getTitle().' by '.$this->getAuthor();
3130
}
3231
}

0 commit comments

Comments
 (0)