From 0368f8004aeccceb20079ba0d3916a12c7fc097e Mon Sep 17 00:00:00 2001 From: Alexis Lefebvre Date: Tue, 5 Sep 2017 12:24:02 +0200 Subject: [PATCH] Restrict Method chaining to setters Remove "I say" that adds no value --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5ae5f0..6b18206 100644 --- a/README.md +++ b/README.md @@ -1469,8 +1469,8 @@ class Manager { ### Use method chaining This pattern is very useful and commonly used it many libraries such as PHPUnit and Doctrine. It allows your code to be expressive, and less verbose. -For that reason, I say, use method chaining and take a look at how clean your code -will be. In your class functions, simply return `this` at the end of every function, +For that reason, use method chaining and take a look at how clean your code +will be. In your class functions, simply use `return $this` at the end of every `set` function, and you can chain further class methods onto it. **Bad:**