From d81e35ec19677cdb228e2f4405d093ff42cc1952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=BDurek?= Date: Mon, 8 Apr 2019 16:11:35 +0200 Subject: [PATCH] Use phpstan callable format (#220) --- src/Database/Connection.php | 4 ++-- src/Database/Helpers.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Database/Connection.php b/src/Database/Connection.php index 547257c4c..4bcb8d276 100644 --- a/src/Database/Connection.php +++ b/src/Database/Connection.php @@ -21,10 +21,10 @@ class Connection { use Nette\SmartObject; - /** @var callable[] function (Connection $connection): void; Occurs after connection is established */ + /** @var callable[]&(callable(Connection $connection): void)[]; Occurs after connection is established */ public $onConnect; - /** @var callable[] function (Connection $connection, ResultSet|DriverException $result): void; Occurs after query is executed */ + /** @var callable[]&(callable(Connection $connection, ResultSet|DriverException $result): void)[]; Occurs after query is executed */ public $onQuery; /** @var array */ diff --git a/src/Database/Helpers.php b/src/Database/Helpers.php index 306b3e942..48ce72f2c 100644 --- a/src/Database/Helpers.php +++ b/src/Database/Helpers.php @@ -184,7 +184,7 @@ public static function detectType(string $type): string /** * Import SQL dump from file - extremely fast. - * @param callable $onProgress function (int $count, ?float $percent): void + * @param callable&callable(int $count, ?float $percent): void $onProgress * @return int count of commands */ public static function loadFromFile(Connection $connection, string $file, callable $onProgress = null): int