From b218f288c8a49da53f6eb7934d9f96eb5a3fa2b5 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Tue, 5 Sep 2017 18:54:01 +0300 Subject: [PATCH] use PSR CS --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4897765..17763c0 100644 --- a/README.md +++ b/README.md @@ -819,34 +819,40 @@ function combine(int $val1, int $val2) **[⬆ back to top](#table-of-contents)** ### Remove dead code + Dead code is just as bad as duplicate code. There's no reason to keep it in your codebase. If it's not being called, get rid of it! It will still be safe in your version history if you still need it. **Bad:** + ```php -function oldRequestModule($url) { +function oldRequestModule($url) +{ // ... } -function newRequestModule($url) { +function newRequestModule($url) +{ // ... } $request = newRequestModule($requestUrl); inventoryTracker('apples', $request, 'www.inventory-awesome.io'); - ``` -**Good**: +**Good:** + ```php -function requestModule($url) { +function requestModule($url) +{ // ... } $request = requestModule($requestUrl); inventoryTracker('apples', $request, 'www.inventory-awesome.io'); ``` + **[⬆ back to top](#table-of-contents)**