From f00e3d5d80407548777d44d872d24dc595ef7539 Mon Sep 17 00:00:00 2001 From: Lucas Michot Date: Mon, 29 Sep 2014 13:08:57 +0200 Subject: [PATCH] Simplify humanize --- src/Stringy.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Stringy.php b/src/Stringy.php index 9f887b8..376d78a 100644 --- a/src/Stringy.php +++ b/src/Stringy.php @@ -365,8 +365,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess */ public function humanize() { - $str = str_replace('_id', '', $this->str); - $str = str_replace('_', ' ', $str); + $str = str_replace(array('_id', '_'), array('', ' '), $this->str); return self::create($str, $this->encoding)->trim()->upperCaseFirst(); }