3
3
namespace Dyrynda \Database ;
4
4
5
5
use Illuminate \Database \Connection ;
6
+ use Illuminate \Database \Schema \ColumnDefinition ;
6
7
use Illuminate \Support \ServiceProvider ;
7
8
use Illuminate \Database \Schema \Blueprint ;
8
9
use Dyrynda \Database \Connection \MySqlConnection ;
@@ -28,19 +29,20 @@ public function boot()
28
29
*/
29
30
public function register ()
30
31
{
31
- Connection::resolverFor ('mysql ' , function ($ connection , $ database , $ prefix , $ config ) {
32
+ Connection::resolverFor ('mysql ' , function ($ connection , $ database , $ prefix , $ config ): MySqlConnection {
32
33
return new MySqlConnection ($ connection , $ database , $ prefix , $ config );
33
34
});
34
35
35
- Connection::resolverFor ('postgres ' , function ($ connection , $ database , $ prefix , $ config ) {
36
+ Connection::resolverFor ('postgres ' , function ($ connection , $ database , $ prefix , $ config ): PostgresConnection {
36
37
return new PostgresConnection ($ connection , $ database , $ prefix , $ config );
37
38
});
38
39
39
- Connection::resolverFor ('sqlite ' , function ($ connection , $ database , $ prefix , $ config ) {
40
+ Connection::resolverFor ('sqlite ' , function ($ connection , $ database , $ prefix , $ config ): SQLiteConnection {
40
41
return new SQLiteConnection ($ connection , $ database , $ prefix , $ config );
41
42
});
42
43
43
- Blueprint::macro ('efficientUuid ' , function ($ column ) {
44
+ Blueprint::macro ('efficientUuid ' , function ($ column ): ColumnDefinition {
45
+ /** @var Blueprint $this */
44
46
return $ this ->addColumn ('efficientUuid ' , $ column );
45
47
});
46
48
}
0 commit comments