Skip to content

Commit

Permalink
Use phpstan callable format (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
adaamz authored and dg committed Apr 8, 2019
1 parent e83b779 commit 1a6ff38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a6ff38

Please sign in to comment.