From a6028054d6638c06c1dce9e637ada13275ad1817 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Fri, 9 Jun 2017 22:20:47 +0200 Subject: [PATCH] added declare(strict_types=1); --- examples/fetching-examples.php | 2 ++ examples/result-set-data-types.php | 2 ++ examples/tracy-and-exceptions.php | 2 ++ examples/tracy.php | 2 ++ examples/using-extension-methods.php | 2 ++ src/Dibi/Bridges/Nette/DibiExtension22.php | 2 ++ src/Dibi/Bridges/Tracy/Panel.php | 2 ++ src/Dibi/Connection.php | 2 ++ src/Dibi/DataSource.php | 2 ++ src/Dibi/DateTime.php | 2 ++ src/Dibi/Drivers/FirebirdDriver.php | 2 ++ src/Dibi/Drivers/MsSqlDriver.php | 2 ++ src/Dibi/Drivers/MsSqlReflector.php | 2 ++ src/Dibi/Drivers/MySqlReflector.php | 2 ++ src/Dibi/Drivers/MySqliDriver.php | 2 ++ src/Dibi/Drivers/OdbcDriver.php | 2 ++ src/Dibi/Drivers/OracleDriver.php | 2 ++ src/Dibi/Drivers/PdoDriver.php | 2 ++ src/Dibi/Drivers/PostgreDriver.php | 2 ++ src/Dibi/Drivers/Sqlite3Driver.php | 2 ++ src/Dibi/Drivers/SqliteReflector.php | 2 ++ src/Dibi/Drivers/SqlsrvDriver.php | 2 ++ src/Dibi/Drivers/SqlsrvReflector.php | 2 ++ src/Dibi/Event.php | 2 ++ src/Dibi/Fluent.php | 2 ++ src/Dibi/HashMap.php | 2 ++ src/Dibi/Helpers.php | 2 ++ src/Dibi/Literal.php | 2 ++ src/Dibi/Loggers/FileLogger.php | 2 ++ src/Dibi/Loggers/FirePhpLogger.php | 2 ++ src/Dibi/Reflection/Column.php | 2 ++ src/Dibi/Reflection/Database.php | 2 ++ src/Dibi/Reflection/ForeignKey.php | 2 ++ src/Dibi/Reflection/Index.php | 2 ++ src/Dibi/Reflection/Result.php | 2 ++ src/Dibi/Reflection/Table.php | 2 ++ src/Dibi/Result.php | 2 ++ src/Dibi/ResultIterator.php | 2 ++ src/Dibi/Row.php | 2 ++ src/Dibi/Strict.php | 2 ++ src/Dibi/Translator.php | 2 ++ src/Dibi/Type.php | 2 ++ src/Dibi/dibi.php | 2 ++ src/Dibi/exceptions.php | 2 ++ src/Dibi/interfaces.php | 2 ++ tests/dibi/Connection.affectedRows.phpt | 2 ++ tests/dibi/Connection.connect.phpt | 2 ++ tests/dibi/Connection.fetch.phpt | 2 ++ tests/dibi/Connection.substitutions.phpt | 2 ++ tests/dibi/Connection.transactions.phpt | 2 ++ tests/dibi/DataSource.phpt | 2 ++ tests/dibi/Fluent.cloning.phpt | 2 ++ tests/dibi/Fluent.delete.phpt | 2 ++ tests/dibi/Fluent.fetch.limit.mssql.phpt | 2 ++ tests/dibi/Fluent.fetch.limit.phpt | 2 ++ tests/dibi/Fluent.fetch.phpt | 2 ++ tests/dibi/Fluent.insert.phpt | 2 ++ tests/dibi/Fluent.select.phpt | 2 ++ tests/dibi/Fluent.update.phpt | 2 ++ tests/dibi/Helpers.getSuggestion().phpt | 2 ++ tests/dibi/Postgre.like.phpt | 2 ++ tests/dibi/Result.meta.phpt | 2 ++ tests/dibi/Result.normalize.phpt | 10 ++++++---- tests/dibi/Result.types.phpt | 2 ++ tests/dibi/Row.phpt | 2 ++ tests/dibi/Sqlsrv.insert.phpt | 2 ++ tests/dibi/Sqlsrv.limits.phpt | 2 ++ tests/dibi/Strict.phpt | 2 ++ tests/dibi/Translator.DateTimeInterface.phpt | 2 ++ tests/dibi/Translator.conditions.phpt | 2 ++ tests/dibi/Translator.identifiers.phpt | 2 ++ tests/dibi/Translator.phpt | 2 ++ tests/dibi/bootstrap.php | 2 ++ tests/dibi/exceptions.mysql.phpt | 2 ++ tests/dibi/exceptions.postgre.phpt | 2 ++ tests/dibi/exceptions.sqlite.phpt | 2 ++ tests/dibi/meta.phpt | 2 ++ tests/dibi/mysql.time.phpt | 2 ++ 78 files changed, 160 insertions(+), 4 deletions(-) diff --git a/examples/fetching-examples.php b/examples/fetching-examples.php index 3bf0b694..753738d0 100644 --- a/examples/fetching-examples.php +++ b/examples/fetching-examples.php @@ -1,5 +1,7 @@ NULL], $result->test(['col' => NULL])); Assert::exception(function () use ($result) { $result->test(['col' => TRUE]); - }, Exception::class); + }, TypeError::class); Assert::same(['col' => NULL], $result->test(['col' => FALSE])); Assert::same(['col' => NULL], $result->test(['col' => ''])); @@ -183,7 +185,7 @@ test(function () { Assert::same(['col' => NULL], $result->test(['col' => NULL])); Assert::exception(function () use ($result) { $result->test(['col' => TRUE]); - }, Exception::class); + }, TypeError::class); Assert::same(['col' => NULL], $result->test(['col' => FALSE])); Assert::same(['col' => NULL], $result->test(['col' => ''])); @@ -201,7 +203,7 @@ test(function () { Assert::same(['col' => NULL], $result->test(['col' => NULL])); Assert::exception(function () use ($result) { $result->test(['col' => TRUE]); - }, Exception::class); + }, TypeError::class); Assert::same(['col' => NULL], $result->test(['col' => FALSE])); Assert::same(['col' => NULL], $result->test(['col' => ''])); @@ -217,7 +219,7 @@ test(function () { Assert::same(['col' => NULL], $result->test(['col' => NULL])); Assert::exception(function () use ($result) { $result->test(['col' => TRUE]); - }, Exception::class); + }, TypeError::class); Assert::same(['col' => NULL], $result->test(['col' => FALSE])); Assert::same(['col' => NULL], $result->test(['col' => ''])); diff --git a/tests/dibi/Result.types.phpt b/tests/dibi/Result.types.phpt index 6be67fc0..aeddfba3 100644 --- a/tests/dibi/Result.types.phpt +++ b/tests/dibi/Result.types.phpt @@ -1,5 +1,7 @@