File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313readonly class Action
1414{
15+ /**
16+ * @param string $name
17+ * @param int $priority
18+ * @param int $acceptedArgs
19+ * @param mixed $classInstance
20+ * @param string $methodName
21+ * @param array<string, string[]> $dependencies
22+ * @param ActionType $actionType
23+ */
1524 public function __construct (
1625 public string $ name ,
1726 public int $ priority ,
Original file line number Diff line number Diff line change 1111use Dbout \WpHook \Enums \ActionType ;
1212
1313/**
14- * - [WP add_action]( https://developer.wordpress.org/reference/functions/add_action/)
14+ * @see https://developer.wordpress.org/reference/functions/add_action/
1515 */
1616#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS )]
1717class Action implements FilterInterface
1818{
19+ /**
20+ * @param string $name The name of the action to add the callback to.
21+ * @param int $priority Used to specify the order in which the functions associated with a particular action are executed.
22+ * @param int $acceptedArgs The number of arguments the function accepts.
23+ * @param array<string|string[]> $dependencies List of dependencies on which the action depends.
24+ */
1925 public function __construct (
2026 protected string $ name ,
2127 protected int $ priority = 10 ,
Original file line number Diff line number Diff line change 1111use Dbout \WpHook \Enums \ActionType ;
1212
1313/**
14- * - [WP add_filter]( https://developer.wordpress.org/reference/functions/add_filter/)
14+ * @see https://developer.wordpress.org/reference/functions/add_filter/
1515 */
1616#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS )]
1717class Filter implements FilterInterface
1818{
19+ /**
20+ * @param string $name The name of the filter to add the callback to.
21+ * @param int $priority Used to specify the order in which the functions associated with a particular filter are executed.
22+ * @param int $acceptedArgs The number of arguments the function accepts.
23+ * @param array<string|string[]> $dependencies List of dependencies on which the action depends.
24+ */
1925 public function __construct (
2026 protected string $ name ,
2127 protected int $ priority = 10 ,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function getActionType(): ActionType;
4646 /**
4747 * List of dependencies on which the action depends.
4848 *
49- * @return array
49+ * @return array<string|string[]>
5050 */
5151 public function getDependencies (): array ;
5252}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class HookLoader
2020 private const CACHE_KEY = '_app_wp_autoloader_hooks ' ;
2121
2222 /**
23- * @param string|array $directory
23+ * @param string|array<string> $directory
2424 * @param CacheItemPoolInterface|null $cache
2525 */
2626 public function __construct (
@@ -76,7 +76,7 @@ protected function findHooks(): array
7676
7777 /**
7878 * @throws HookException
79- * @return array
79+ * @return array<string>
8080 */
8181 protected function getDirectories (): array
8282 {
@@ -131,7 +131,7 @@ public function register(): void
131131
132132 /**
133133 * @param Action $action
134- * @return array
134+ * @return array<string, mixed>
135135 */
136136 protected function getHookArg (Action $ action ): array
137137 {
You can’t perform that action at this time.
0 commit comments