Skip to content

Commit 1a6ff38

Browse files
adaamzdg
authored andcommitted
Use phpstan callable format (#220)
1 parent e83b779 commit 1a6ff38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Database/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class Connection
2121
{
2222
use Nette\SmartObject;
2323

24-
/** @var callable[] function (Connection $connection): void; Occurs after connection is established */
24+
/** @var callable[]&(callable(Connection $connection): void)[]; Occurs after connection is established */
2525
public $onConnect;
2626

27-
/** @var callable[] function (Connection $connection, ResultSet|DriverException $result): void; Occurs after query is executed */
27+
/** @var callable[]&(callable(Connection $connection, ResultSet|DriverException $result): void)[]; Occurs after query is executed */
2828
public $onQuery;
2929

3030
/** @var array */

src/Database/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public static function detectType(string $type): string
184184

185185
/**
186186
* Import SQL dump from file - extremely fast.
187-
* @param callable $onProgress function (int $count, ?float $percent): void
187+
* @param callable&callable(int $count, ?float $percent): void $onProgress
188188
* @return int count of commands
189189
*/
190190
public static function loadFromFile(Connection $connection, string $file, callable $onProgress = null): int

0 commit comments

Comments
 (0)