Skip to content

Commit ec3da53

Browse files
authored
Fix incorrect docblock for custom builder resolvers (#56392)
* Fix incorrect docblock for custom builder resolvers Fixes #56152 which was caused by the incorrect parameters being used for a more specific type hint docblock merged in #55687. This currently causes issues with projects that use static analysis and make use of the $builder->blueprintResolver() method to resolve custom blueprints. Example below: ------ ---------------------------------------------------------------------------------------------------------- Line Database/DatabaseServiceProvider.php ------ ---------------------------------------------------------------------------------------------------------- :109 Parameter #1 $connection of class Winter\Storm\Database\Schema\Blueprint constructor expects Illuminate\Database\Connection, string given. 🪪 argument.type :109 Parameter #2 $table of class Winter\Storm\Database\Schema\Blueprint constructor expects string, Closure given. 🪪 argument.type :109 Parameter #3 $callback of class Winter\Storm\Database\Schema\Blueprint constructor expects Closure|null, string given. 🪪 argument.type ------ ---------------------------------------------------------------------------------------------------------- * Update src/Illuminate/Database/Schema/Builder.php * Apply suggestions from code review
1 parent d41f408 commit ec3da53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Schema/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Builder
3030
/**
3131
* The Blueprint resolver callback.
3232
*
33-
* @var \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null
33+
* @var \Closure(\Illuminate\Database\Connection, string, \Closure|null): \Illuminate\Database\Schema\Blueprint
3434
*/
3535
protected $resolver;
3636

@@ -698,7 +698,7 @@ public function getConnection()
698698
/**
699699
* Set the Schema Blueprint resolver callback.
700700
*
701-
* @param \Closure(string, \Closure, string): \Illuminate\Database\Schema\Blueprint|null $resolver
701+
* @param \Closure(\Illuminate\Database\Connection, string, \Closure|null): \Illuminate\Database\Schema\Blueprint $resolver
702702
* @return void
703703
*/
704704
public function blueprintResolver(Closure $resolver)

0 commit comments

Comments
 (0)