44
55/**
66 * Handler is a generic handler in the chain of responsibilities
7- *
8- * Yes you could have a lighter CoR with simpler handler but if you want your CoR to
9- * be extendable and decoupled, it's a better idea to do things like that in real
7+ *
8+ * Yes you could have a lighter CoR with a simpler handler but if you want your CoR
9+ * to be extendable and decoupled, it's a better idea to do things like that in real
1010 * situations. Usually, a CoR is meant to be changed everytime and evolves, that's
1111 * why we slice the workflow in little bits of code.
1212 */
@@ -19,13 +19,13 @@ abstract class Handler
1919
2020 /**
2121 * Append a responsibility to the end of chain
22- *
22+ *
2323 * A prepend method could be done with the same spirit
24- *
25- * You could also send the successor in the constructor but in PHP it is a
24+ *
25+ * You could also send the successor in the constructor but in PHP that is a
2626 * bad idea because you have to remove the type-hint of the parameter because
2727 * the last handler has a null successor.
28- *
28+ *
2929 * And if you override the constructor, that Handler can no longer have a
3030 * successor. One solution is to provide a NullObject (see pattern).
3131 * It is more preferable to keep the constructor "free" to inject services
@@ -43,10 +43,10 @@ final public function append(Handler $handler)
4343 }
4444
4545 /**
46- * Handle the request.
47- *
48- * This approach by using a template method pattern ensures you that
49- * each subclass will not forget to call the successor. Beside , the returned
46+ * Handle the request.
47+ *
48+ * This approach by using a template method pattern ensures you that
49+ * each subclass will not forget to call the successor. Besides , the returned
5050 * boolean value indicates you if the request have been processed or not.
5151 *
5252 * @param Request $req
0 commit comments