Skip to content

Commit f389a73

Browse files
committed
chore: types added for editor support
1 parent 6a1b20d commit f389a73

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"editor.defaultFormatter": "esbenp.prettier-vscode",
1111
"editor.formatOnSave": true,
1212
"editor.codeActionsOnSave": {
13-
"source.fixAll.eslint": true
13+
"source.fixAll.eslint": "explicit"
1414
},
1515
"stylelint.snippet": ["css", "scss"],
1616
"stylelint.validate": ["css", "scss", "postcss"],

src/Hooks/Hooks.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
* A forwarder class for actions and filters.
99
*
1010
* @method static HooksWrapper doAction($tag, ...$arg)
11-
* @method static HooksWrapper addAction($tag, $functionToAdd, $priority = 10, $acceptedArgs = 1)
12-
* @method static HooksWrapper removeAction($tag, $functionToRemove, $priority = 10)
13-
* @method static HooksWrapper addFilter($tag, $functionToAdd, $priority = 10, $acceptedArgs = 1)
11+
* @method static HooksWrapper addAction($tag,callable $functionToAdd, $priority = 10, $acceptedArgs = 1)
12+
* @method static HooksWrapper removeAction($tag,callable $functionToRemove, $priority = 10)
13+
* @method static HooksWrapper addFilter($tag,callable $functionToAdd, $priority = 10, $acceptedArgs = 1)
1414
* @method static HooksWrapper applyFilter($tag, $value, ...$args)
1515
*/
1616
final class Hooks

src/Http/Router/Route.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
* @method static RouteBase getRoutePrefix()
1616
* @method static RouteBase group(Closure $callback)
1717
* @method static RouteBase getRouter()
18-
* @method static RouteRegister match($methods, $path, $action)
19-
* @method static RouteRegister get($path, $action)
20-
* @method static RouteRegister post($path, $action)
18+
* @method static RouteRegister match($methods, $path, callable $action)
19+
* @method static RouteRegister get($path, callable $action)
20+
* @method static RouteRegister post($path, callable $action)
2121
* @method static RouteRegister getMethods()
22-
* @method static RouteRegister action($action)
22+
* @method static RouteRegister action(callable $action)
2323
* @method static RouteRegister getAction()
2424
* @method static RouteRegister path($path)
2525
* @method static RouteRegister getPath()

src/Http/Router/RouteBase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
/**
1010
* Base class for route
1111
*
12-
* @method static RouteRegister match($methods, $path, $action)
13-
* @method static RouteRegister get($path, $action)
14-
* @method static RouteRegister post($path, $action)
12+
* @method static RouteRegister match($methods, $path, callable$action)
13+
* @method static RouteRegister get($path, callable $action)
14+
* @method static RouteRegister post($path, callable $action)
1515
* @method static RouteRegister getMethods()
16-
* @method static RouteRegister action($action)
16+
* @method static RouteRegister action(callable $action)
1717
* @method static RouteRegister getAction()
1818
* @method static RouteRegister path($path)
1919
* @method static RouteRegister getPath()

src/Shortcode/Shortcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* A forwarder class for actions and filters.
99
*
1010
* @method static void doShortcode( $content, $ignoreHtml = false )
11-
* @method static void addShortcode($tag, $callback)
11+
* @method static void addShortcode($tag, callable $callback)
1212
* @method static void removeShortcode($tag)
1313
* @method static bool shortcodeExists($tag)
1414
* @method static bool hasShortcode($content, $tag)

0 commit comments

Comments
 (0)