From 9140b657f10d6e1a645af68573d9448bc2f94deb Mon Sep 17 00:00:00 2001 From: Andrej Badin Date: Mon, 7 Apr 2014 22:19:16 +0200 Subject: [PATCH 1/2] Fix `count` method return value. Return number represented as integer instead of string. --- src/Illuminate/Database/Query/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php index 2f9a3ab3245d..264b672a721c 100755 --- a/src/Illuminate/Database/Query/Builder.php +++ b/src/Illuminate/Database/Query/Builder.php @@ -1586,7 +1586,7 @@ public function exists() */ public function count($column = '*') { - return $this->aggregate(__FUNCTION__, array($column)); + return (int)$this->aggregate(__FUNCTION__, array($column)); } /** From 022d18c72bc56eb00757e4ba59de6cb5437efce1 Mon Sep 17 00:00:00 2001 From: Andrej Badin Date: Mon, 7 Apr 2014 23:36:14 +0200 Subject: [PATCH 2/2] Add space between type-casting operator and return value. --- src/Illuminate/Database/Query/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php index 264b672a721c..68f0031dffe8 100755 --- a/src/Illuminate/Database/Query/Builder.php +++ b/src/Illuminate/Database/Query/Builder.php @@ -1586,7 +1586,7 @@ public function exists() */ public function count($column = '*') { - return (int)$this->aggregate(__FUNCTION__, array($column)); + return (int) $this->aggregate(__FUNCTION__, array($column)); } /**