From d4b87490a157c7ab3cba2749384db70cd76c3be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20H=C5=AFla?= Date: Thu, 7 Sep 2017 10:42:46 +0200 Subject: [PATCH] Fluent: fixed phpDoc, query() may return Result|int --- src/Dibi/Fluent.php | 2 +- tests/dibi/Fluent.fetch.phpt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Dibi/Fluent.php b/src/Dibi/Fluent.php index e0ae70a5..90e9f924 100644 --- a/src/Dibi/Fluent.php +++ b/src/Dibi/Fluent.php @@ -415,7 +415,7 @@ class Fluent implements IDataSource /** - * @return Result + * @return Result|int */ private function query($args) { diff --git a/tests/dibi/Fluent.fetch.phpt b/tests/dibi/Fluent.fetch.phpt index 0ed4e99b..51dbb122 100644 --- a/tests/dibi/Fluent.fetch.phpt +++ b/tests/dibi/Fluent.fetch.phpt @@ -48,3 +48,8 @@ if (!in_array($config['system'], ['odbc', 'sqlsrv'], true)) { ], ], $res->fetchAssoc('name,title')); } + + +// affected rows +$res = $conn->update('products', ['title' => 'new'])->execute(); +Assert::same(3, $res);